Prv8 Shell
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4
System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64
User : jackjohn ( 502)
PHP Version : 5.3.17
Disable Function : NONE
Directory :  /usr/libexec/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/libexec/scripts/hal-luks-setup
#!/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

haha - 2025