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-setup < prev    next >
Text File  |  2006-11-29  |  837b  |  24 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. if [ -z "$HAL_PROP_BLOCK_DEVICE" ] || [ -z "$HAL_PROP_INFO_UDI" ] || [ -z "$HAL_PROP_VOLUME_UUID" ] ; then
  9.         echo "org.freedesktop.Hal.Device.UnknownError" >&2
  10.         echo "Missing or empty environment variable(s)." >&2
  11.         echo "This script should be started by hald." >&2
  12.         exit 1
  13. fi
  14.  
  15.  
  16. if [ -n "$HALD_UNAME_S" -a -x ./$HALD_UNAME_S/hal-luks-setup-$HALD_UNAME_S ]; then
  17.     exec ./$HALD_UNAME_S/hal-luks-setup-$HALD_UNAME_S $@
  18. else
  19.     echo "org.freedesktop.Hal.Device.UnknownError" >&2
  20.     echo "No back-end for your operating system" >&2
  21.     exit 1
  22. fi
  23.