hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Fri Aug 31 12:33:06 PDT 2007


 tools/hal-luks-teardown |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
diff-tree d8651578ff433dac884a349382388644a34ea69e (from 13dea3cefe32bfa400804775527788399ff08fd3)
Author: David Zeuthen <davidz at redhat.com>
Date:   Fri Aug 31 15:27:06 2007 -0400

    fix last commit for LUKS; forgot to refact error handling

diff --git a/tools/hal-luks-teardown b/tools/hal-luks-teardown
index 5f002c9..0f531e7 100755
--- a/tools/hal-luks-teardown
+++ b/tools/hal-luks-teardown
@@ -14,12 +14,16 @@ locked_out() {
 	exit 1
 }
 
-# Check for environment variables
-if [ -z "$HAL_PROP_BLOCK_DEVICE" ] || [ -z "$HAL_PROP_INFO_UDI" ] || [ -z "$HAL_PROP_VOLUME_UUID" ] ; then
+unknown_error() {
         echo "org.freedesktop.Hal.Device.UnknownError" >&2
         echo "Missing or empty environment variable(s)." >&2
         echo "This script should be started by hald." >&2
         exit 1
+}
+
+# Check for environment variables
+if [ -z "$HAL_PROP_BLOCK_DEVICE" ] || [ -z "$HAL_PROP_INFO_UDI" ] || [ -z "$HAL_PROP_VOLUME_UUID" ] ; then
+    unknown_error
 fi
 
 # Respect the same locks as Mount()/Unmount() etc.


More information about the hal-commit mailing list