[plug] loading programs on startup
Craig Ringer
craig at postnewspapers.com.au
Thu Oct 2 19:35:10 WST 2003
> I've jsut made a program the continually checks the com port status,
> then shuts down the computer when a button is pressed.
> I was wondering is it possibly to load it when the computer boots, and
> do i have to change the code at all to make this happen (attached).
Red Hat and most other RPM based distros: add it to /etc/rc.d/rc.sysinit
and it'll get run at boot. Make sure it backgrounds itself or call it as
"programname &", since otherwise it'll hang your boot process.
Alternately, use System V init - basically copy the way your existing
/etc/init.d and /etc/rc*.d stuff works - or the @reboot cron method
Bernard suggested.
IMHO, rc.sysinit is the easy way for those distros that use it,
otherwise I'd use an init script.
Craig Ringer
_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug
More information about the plug
mailing list