| PLEX86 | ||
|
Linux shutdown sequence 77-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kyle Sure. There are all sorts of ways. Read the inittab(5) manpage ("man 5 inittab") and take a look at youretc-inittab file. In the file, you'll find lines that look like # What to do at the "Three Finger Salute". ca::ctrlaltdel:-sbin-shutdown -t5 -r now # Runlevel 0 halts the system. l0:0:wait:-etc-rc.d-rc.0 Weird problem booting 81 In all honestly, I'm too lazy to take the drives out AND reconfigure GRUB. It's easier to hit del, and... # Runlevel 6 reboots the system. l6:6:wait:-etc-rc.d-rc.6 # What to do when power fails. pf::powerfail:-sbin-genpowerfail start The lines that contain a 0 between the first and second colon (in the example above, the line that starts "l0:0:" is one) are instructions to init on what to do when entering runstate 0 (the runstate that you get when you "shutdown - -h" or "telinit 0" or "halt"). There are other lines (the ones with a 6 between the 1st and 2nd colon) that are run when entering runstate 6 (the runstate that you get when you "shutdown -r" or "telinit 6" or "reboot"). Each of these lines names a script or program to be run, and each line is executed in sequence. You can - - locate a script that is currently executed from your inittab when you shutdown, and add your script logic to it, or - - add your own script toetc-inittab using the appropriate syntax to have it invoked on shutdown In the above example inittab (from Slackware 10.1), if I wanted to add logic that runs one of my own scripts when the user types "shutdown", I could add logic to theetc-rc.d-rc.0 (for halt) andetc-rc.d-rc.6 (for reboot) scripts identified by the l0 and l6 inittab entries, or I could add a new line toetc-inittab,beforethe l0 and l6 lines that read something like lx:06:wait:-etc-rc.d-rc.local.shutdown and put my custom logic into the (new, local)etc-rc.d-rc.local.shutdown script Does this help? - -- Lew Pitcher Master Codewright & JOAT-in-training GPG public key available on request Slackware - Because I know what I'm doing. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.7 (GNU-Linux) Linux shutdown sequence 78 If you are running Debian, Ubuntu, Knoppix, or Gentoo, I don't know the details. If you are running a distribution like RedHat, Fedora, Centos SuSE, or Mandrivia: What these distros have in... iD8DBQFDwGhZagVFX4UWr64RAtJpAKDJZLVz7b2+TZ6BaQRwxm879F610ACfdyTX kHrV+JWHJbqBRr-gnBAsZwU= =6pO5 -----END PGP SIGNATURE-----
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||