home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / usr / lib / hal / scripts / linux / hal-system-power-shutdown-linux < prev    next >
Text File  |  2006-11-29  |  335b  |  19 lines

  1. #!/bin/sh
  2.  
  3. unsupported() {
  4.     echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
  5.     echo "No shutdown command found" >&2
  6.     exit 1
  7. }
  8.  
  9. #Try for common tools
  10. if [ -x "/sbin/shutdown" ] ; then
  11.     /sbin/shutdown -h now
  12.     exit $?
  13. elif [ -x "/usr/sbin/shutdown" ] ; then
  14.     /usr/sbin/shutdown -h now
  15.     exit $?
  16. else
  17.     unsupported
  18. fi
  19.