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

I'd like my openSuse 11.1 server to run a small shell script on startup. I've created a the script and put a symbolic link to the script in /etc/init.d/rc5.d/. Yet, the script does not get executed.

This is the script I am trying to run:

#monitor RAID array
/sbin/mdadm --monitor --daemonize --mail=adrian@linuxplug.fli4l /dev/md0 /dev/md1 /dev/md2 /dev/md3
#start SVN server
/usr/bin/svnserve -d

The script works fine when I run it myself from the command line (svn server and mdadm are daemonized as expected). But it does not seem to be started when rebooting the server.

This might help you figure out what I am doing wrong:

linuxplug:~ # ls -l /etc/init.d/rc5.d/exe*
lrwxrwxrwx 1 root root 25 May 22 11:43 /etc/init.d/rc5.d/ -> /root/
linuxplug:~ # ls -l /root/
-rwxr-xr-x 1 root root 172 Apr 12 13:43 /root/
linuxplug:~ # which svnserve

What am I doing wrong?

Edit: I've renamed the link to the shell script as follows:

linuxplug:~ # ls -l /etc/init.d/rc5.d/    
lrwxrwxrwx 1 root root 25 May 22 12:03 S99executeatstartup -> /root/executeatsta

However, the script still isn't run on startup.

share|improve this question
up vote 1 down vote accepted

Have you tried adding a call to the script in your /etc/init.d/boot.local? Try it and see if that works better. There are several other boot.* files that are run at different parts of the startup.

share|improve this answer

you should have your link named S99something, where S stands for starting, and 99 stands for the order in which the scripts in that directory are started. see the other link in that directory...

Besides: you may want to rework the script to honour start / stop arguments, and add a K99something symlink to make sure the services are properly stop when leaving this run level.

share|improve this answer
Thanks for the hint! I've renamed the link to S99executeatstartup, but it still isn't run (see edit of my posting above). Anything else I missed? – Adrian Grigore May 22 '09 at 10:20
Maybe your default runlevel is 3 (non-graphical)? – Node May 22 '09 at 10:28
nope, it's coming up to runlevel 5 – Adrian Grigore May 22 '09 at 10:31

Have you allready followed the steps listed on the opensuse web site? That should definitely work.

There is a pretty good explanation at Cool Solutions as well

share|improve this answer

You should put that commands in /etc/rc.local (or equivalent in opensuse)

initscripts must have a certain syntax. You can check one of them for an example, but what you need is /etc/rc.local

share|improve this answer
There is no rc.local in opensuse. I've followed the tutorial at, but it still does not work. – Adrian Grigore May 22 '09 at 12:13

There should definitely be a way to do what you want from the /etc/rc*. Another alternative you might want to look into is cron. With vixie-cron it's possible to specify tasks to run on reboot with the @reboot keyword in your crontab:

Instead of the first five fields, one of eight special strings may

string         meaning
------         -------
@reboot        Run once, at startup.
@yearly        Run once a year, "0 0 1 1 *".
@annually      (same as @yearly)
@monthly       Run once a month, "0 0 1 * *".
@weekly        Run once a week, "0 0 * * 0".
@daily         Run once a day, "0 0 * * *".
@midnight      (same as @daily)
@hourly        Run once an hour, "0 * * * *".

The above table is from a blog post by Jeremy Zawodny which I'm not allowed to post a link to as a new user. Search for "vixie-cron specify tasks on boot" on Google, and it's the first result.

As mentioned in the article, it's a great way to allows users to run commands at startup without granting them root access.

share|improve this answer

It's also worth checking /etc/inittab to ensire that you're booting into runlevel five by default, look for a line like:


That's from my debian laptop and shows that I boot into runlevel two by default (which is debian's default).

On RedHat derivatives (like openSuSE) runlevel five is the default when running X11, runlevel three is the default to boot to the console.

share|improve this answer

Does opensuse have selinux? If so is it turned on and is the context of your script the same as the other start up scripts? Try getenforce to see if selinux in installed an turned on. Try ls -lZ /etc/init.d/rc5.d/ to see the scripts' contexts

share|improve this answer

Your Answer


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.