Modify ↓
Ticket #968 (closed defect: fixed)
APT Fails to Install Packages
Reported by: | [email protected]… | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | APT cron | Cc: |
Description
When run as root from a job in /etc/cron.d/bcfg2 APT doesn't function since dpkg isn't happy with the cron environment.
Bcfg2.Client.Frame[24015]: < dpkg: warning: 'ldconfig' not found on PATH.
dpkg: warning: 'start-stop-daemon' not found on PATH.
dpkg: warning: 'update-rc.d' not found on PATH.
dpkg: 3 expected program(s) not found on PATH.
root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
solj suggested filing this bug report. This can be resolved by changing the cron ENV in some way (running in a wrapper script, specifying a path before the command, etc.)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
I've committed a fix that ensures that /sbin and /usr/sbin are in the path (added at the end, so that they can be overridden if desired. Commited in [1e601ac56f7a91631274f26dfc3cef7a4be5b3bc]. Thanks for the report.