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 / hal-luks-teardown < prev    next >
Text File  |  2006-11-29  |  877b  |  25 lines

  1. #!/bin/bash
  2.  
  3. # Copyright (C) 2005 W. Michael Petullo <mike@flyn.org>
  4. # Copyright (C) 2006 David Zeuthen <davidz@redhat.com>
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License version 2.
  7.  
  8. # Check for environment variables
  9. if [ -z "$HAL_PROP_BLOCK_DEVICE" ] || [ -z "$HAL_PROP_INFO_UDI" ] || [ -z "$HAL_PROP_VOLUME_UUID" ] ; then
  10.         echo "org.freedesktop.Hal.Device.UnknownError" >&2
  11.         echo "Missing or empty environment variable(s)." >&2
  12.         echo "This script should be started by hald." >&2
  13.         exit 1
  14. fi
  15.  
  16.  
  17. if [ -n "$HALD_UNAME_S" -a -x ./$HALD_UNAME_S/hal-luks-teardown-$HALD_UNAME_S ]; then
  18.     exec ./$HALD_UNAME_S/hal-luks-teardown-$HALD_UNAME_S $@
  19. else
  20.     echo "org.freedesktop.Hal.Device.UnknownError" >&2
  21.     echo "No back-end for your operating system" >&2
  22.     exit 1
  23. fi
  24.