This is a discussion on Cancel Shutdown within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> i'd like to write some lines of script in the /etc/rc.0 and let it detect some conditions, if not ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| i'd like to write some lines of script in the /etc/rc.0 and let it detect some conditions, if not hold, i wanna cancel the shutdow procedure by 'exit non-zero'. but i found this idea simply does _not_ work. is there any legel way to implement this? -- steven woody (id: narke) |
| |||
| Steven Woody <anti-spam.narkewoody@gmail.com.dont-post-to> wrote: > i'd like to write some lines of script in the /etc/rc.0 and let it detect some > conditions, if not hold, i wanna cancel the shutdow procedure by 'exit > non-zero'. but i found this idea simply does _not_ work. I solved this problem by creating a script named shutdown. I put this script in a bin folder, which is searched before /sbin/. No each time I like to get the system down, I just call shutdown and performs the necessary checks. Afterwards it calls shutdown -h now. However, this solution does not work, if the user presses Ctrl+Alt+Del. Sebastian -- http://www.halle-ist-schoen.de/ |
| |||
| On Tue, 20 Sep 2005 18:47:28 +0200, Sebastian Stein <seb_stein@gmx.de> wrote: [custom shutdown script] > Afterwards > it calls shutdown -h now. However, this solution does not work, if the user > presses Ctrl+Alt+Del. The file /etc/inittab controls what program is invoked when Ctrl+Alt+Del is performed. You should be able to edit /etc/inittab so that your shutdown script is invoked instead of /sbin/shutdown. -- Mark Hill |
| ||||
| Mark Hill <m@rk.invalid> wrote: >> Afterwards >> it calls shutdown -h now. However, this solution does not work, if the user >> presses Ctrl+Alt+Del. > > The file /etc/inittab controls what program is invoked when Ctrl+Alt+Del > is performed. You should be able to edit /etc/inittab so that your > shutdown script is invoked instead of /sbin/shutdown. Oh yeah, that's true, so I can directly put the call there! Sebastian -- http://www.halle-ist-schoen.de/ |