Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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