0

On an OpenSuSE linux machine, I want to run a script when the machine is booted. As the script does not start a service, is /etc/rc.d the correct place for the script?

Thanks.

user265330
  • 2,533
  • 6
  • 31
  • 42
  • Considering that some scripts in /etc/rc.d don't actually leave a process running in the background, meaning that not all of those are "services" per se, I think /etc/rc.d is a good place to leave something you want to be executed at boot. – lmcanavals Mar 12 '12 at 13:21

1 Answers1

1

That's where I've always put them. There are several scripts in rc.d already which don't actually start a process. However, you need to write it in a similar fashion to the other startup scripts - have a look at a few to see how they are set up. Specifically, you should make sure that it's possible to run the script using /etc/rc.d/myscript start.

aquavitae
  • 17,414
  • 11
  • 63
  • 106