Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am writing a script to do some tasks at boot up time in my Debian Wheezy AWS EC2 AMI. Sources on the internet say that usual way to do this is to use update-rc.d to install the symlinks needed to set it up to run at boot time.

However, when I try this, I get the error

$ update-rc.d
-bash: update-rc.d: command not found

This method has been working for me till Debian Squeeze. Has the standard way to do this changed in Debian 7.0? I am not able to find any documentation that explains how to do it in the official way.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Looks like you're trying to use update-rc.d as an unprivileged user? Since this tool is located in /usr/sbin/ you probably don't have it in your $PATH. So try running it as root user or call it via sudo update-rc.d.

share|improve this answer

Your script has to contain a LSB (Linux Standards Base) header which indicates its dependencies and capabilities (see https://wiki.debian.org/LSBInitScripts for more about LSB headers).

If a LSB header is present, you can use insserv to include your script in the boot process (see https://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for more information).

share|improve this answer

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.