| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/11490/root/usr/libexec/scripts/ |
Upload File : |
#!/bin/bash
# Copyright (C) 2005 W. Michael Petullo <mike@flyn.org>
# Copyright (C) 2006 David Zeuthen <davidz@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2.
. hal-functions
locked_out() {
echo "org.freedesktop.Hal.Device.InterfaceLocked" >&2
echo "Enclosing drive/volume is locked" >&2
exit 1
}
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
}
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.
if [ -n "$HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME" ] ; then
hal-is-caller-locked-out --udi $HAL_PROP_INFO_UDI \
--interface org.freedesktop.Hal.Device.Volume \
--caller "$HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME"
RET=$?
if [ "$RET" != "0" ] ; then
locked_out
fi
hal-is-caller-locked-out --udi $HAL_PROP_BLOCK_STORAGE_DEVICE \
--interface org.freedesktop.Hal.Device.Storage \
--caller "$HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME"
RET=$?
if [ "$RET" != "0" ] ; then
locked_out
fi
fi
IS_HOTPLUGGABLE=`hal-get-property --udi $HAL_PROP_BLOCK_STORAGE_DEVICE --key storage.hotpluggable`
if [ "$IS_HOTPLUGGABLE" == "true" ] ; then
ACTION="org.freedesktop.hal.storage.crypto-setup-removable"
elif [ "$IS_HOTPLUGGABLE" == "false" ] ; then
ACTION="org.freedesktop.hal.storage.crypto-setup-fixed"
else
unknown_error
fi
hal_check_priv $ACTION
hal_exec_backend