home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / event.d / rc0 < prev    next >
Encoding:
Text File  |  2007-03-11  |  552 b   |  26 lines

  1. # rc0 - runlevel 0 compatibility
  2. #
  3. # This task runs the old sysv-rc runlevel 0 ("halt/poweroff") scripts with
  4. # the decision as to whether to halt or power off the system left up to the
  5. # script (and thus /etc/default/poweroff).
  6.  
  7. start on runlevel 0
  8.  
  9. stop on runlevel [!0]
  10.  
  11. console output
  12. script
  13.     set $(runlevel || true)
  14.     if [ "$2" != "0" ] && [ "$2" != "6" ]; then
  15.         set $(runlevel --set 0 || true)
  16.         fi
  17.  
  18.     if [ "$1" != "unknown" ]; then
  19.         PREVLEVEL=$1
  20.         RUNLEVEL=$2
  21.         export PREVLEVEL RUNLEVEL
  22.     fi
  23.  
  24.     exec /etc/init.d/rc 0
  25. end script
  26.