~ubuntu-branches/debian/sid/hal/sid

« back to all changes in this revision

Viewing changes to tools/hal-system-killswitch-get-power

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2007-10-23 12:33:58 UTC
  • Revision ID: james.westby@ubuntu.com-20071023123358-xaf8mjc5n84d5gtz
Tags: upstream-0.5.10
ImportĀ upstreamĀ versionĀ 0.5.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
# the Free Software Foundation; either version 2 of the License, or
8
8
# (at your option) any later version.
9
9
 
 
10
. hal-functions
 
11
 
10
12
# Check for environment variables
11
13
if [ -z "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" ]; then
12
14
        echo "org.freedesktop.Hal.Device.UnknownError" >&2
15
17
        exit 1
16
18
fi
17
19
 
18
 
# TODO: check privilege
19
 
 
20
 
if [ -n "$HALD_UNAME_S" -a -x ./$HALD_UNAME_S/hal-system-killswitch-get-power-$HALD_UNAME_S ]; then
21
 
    exec ./$HALD_UNAME_S/hal-system-killswitch-get-power-$HALD_UNAME_S $@
22
 
else
23
 
    echo "org.freedesktop.Hal.Device.UnknownError" >&2
24
 
    echo "No back-end for your operating system" >&2
25
 
    exit 1
26
 
fi
 
20
hal_check_priv org.freedesktop.hal.killswitch.$HAL_PROP_KILLSWITCH_TYPE
 
21
hal_exec_backend