How do you customize scripts' sequence number for different runlevels?
1) I have a start/stop script in /etc/init.d/myscript and I would like the script to start at sequence number 60 at runlevel 2 and 99 for the rest of the runlevels. That is,
/etc/rc1.d/S99myscript /etc/rc2.d/S60myscript /etc/rc3.d/S99myscript /etc/rc4.d/S99myscript /etc/rc5.d/S99myscript /etc/rc6.d/S99myscript Can this be accomplished through update-rc.d command? 2) I have a start/stop script in /etc/init.d/myscript and the script starts at sequence number 99 on all runlevels. How do I edit with 'update-rc.d' to change the sequence number at runlevel 2 from 99 to 50? 3) How do I remove a script from running at runlevel 2 without affecting the start/stop sequence of the script for the rest of the runlevels? Thanks ! |
To set to 50
update-rc.d myscript start 50 2 3 4 5 . stop 50 0 1 6 . Disabling myscript for runlevel 3 update-rc.d myscript stop 50 3 . |
Quote:
/etc/rc1.d/S99myscript /etc/rc2.d/S50myscript /etc/rc3.d/S99myscript /etc/rc4.d/S99myscript /etc/rc5.d/S99myscript /etc/rc6.d/S99myscript 2) Can the sequence number of existing links in /etc/rcx.d be changed with 'update-rc.d'? Eg. to change sequence number of /etc/rc2.d/S99myscript to /etc/rc2.d/S80myscript. Quote:
Thanks ! |
All times are GMT -5. The time now is 01:32 AM. |