When I run the following from the linux command line it works properly and populates the chkconfig.bak file correctly :

#chkconfig --list > chkconfig.bak

But when the command is run from a daily shell script the chkconfig.bak file comes out empty.

Any guesses why this would be happening?

link|improve this question

69% accept rate
feedback

1 Answer

up vote 2 down vote accepted

You will probably need to use the full path to chkconfig

/sbin/chkconfig --list > chkconfig.bak

and you may want to put a full path on the output too.

link|improve this answer
Great answer. Thank you. – Haluk Sep 3 '11 at 3:12
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.