D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Debian apt-get upgrade and cron



I haven't got a debian install at the moment so I
can't check the paths for you but I'd try - 

find / -name ldconfig

and repeat for each of the apparently missing files
the n write a little bash script:

#! /bin/bash
PATH=$PATH:newpath1:newpath2 . . .
apt-get upgrade -y

make the file executable, then call it from cron.

--- Neil Williams <linux@xxxxxxxxxxxxxx> wrote: >
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I had the bright idea of letting cron manage the
updates:
apt-get update works fine.
apt-get upgrade -y generates an error each time:

dpkg: `ldconfig' not found on PATH.
dpkg: `start-stop-daemon' not found on PATH.
dpkg: `install-info' not found on PATH.
dpkg: `update-rc.d' not found on PATH.
dpkg: 4 expected program(s) not found on PATH.
NB: root's PATH should usually contain
/usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code
(2)

How can I get cron to use the same environment?
(Works fine when I su and run from bash)

- -- 

Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)


iD8DBQFALytoiAEJSii8s+MRAg7KAJ9homLnWWYzrUggpzuQgA6uefZllQCeI3V3
VDEPzUkVD3o0qDcGktGp39U=
=hxa3
-----END PGP SIGNATURE-----


--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list"
in the
message body to unsubscribe. 


       
       
               
___________________________________________________________
BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 
http://btyahoo.yahoo.co.uk

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.



Lynx friendly