0

I need to run a program on boot-up and install the corresponding code into the system startup-script.

Unfortunately, not all are using the same system:

  • I checked Debian and CentOS and they use /etc/rc.local (probably also RedHat and Ubuntu)
  • I checked SuSE and it uses /etc/init.d/boot.local
  • Other distributions (Slackware, Gentoo, etc.) may use something else
  • non-Linux Unixes like FreeBSD, MacOSX, OpenBSD, etc. may also use something else

I cannot try out all derivates, is there any documentation that sums up the various boot-up concepts? Also what will SystemD use? Is SuSE the only one that does not use /etc/rc.local or are there others?

Is there some "best-practice" common solution for that problem? (i.e. a script/program that checks all possibilities and returns the correct location of the startup-script)

1 Answer 1

0

crontab should be available for all these systems.

The documentation of advanced crontab provides information about special strings such as reboot (@reboot), giving you the possibility to run your program on every boot-up.

1
  • That does not work because @reboot is a recent feature that is not supported by all distributions, also it seems quite buggy as well, see for example unix.stackexchange.com/questions/109804/… which lists a whole number of bugs in recent versions of a distribution. Sep 17, 2014 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .