diff options
author | David Zeuthen <davidz@redhat.com> | 2007-03-23 20:02:43 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2007-03-23 20:02:43 -0400 |
commit | 1e8845e9ad0a2583b21d962c1a683597ead69c65 (patch) | |
tree | c7e79a75b50239b68a033e7cc61874f4075c0346 /tools/hal-system-killswitch-set-power | |
parent | 0cd8dccc8382f26d3b3f68f6131aefd08b134232 (diff) |
use libsmbios to add support for bluetooth, wlan RF kill on Dell laptops
Diffstat (limited to 'tools/hal-system-killswitch-set-power')
-rwxr-xr-x | tools/hal-system-killswitch-set-power | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/hal-system-killswitch-set-power b/tools/hal-system-killswitch-set-power new file mode 100755 index 00000000..4175c607 --- /dev/null +++ b/tools/hal-system-killswitch-set-power @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Copyright (C) 2007 Bastien Nocera <bnocera@redhat.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# Check for environment variables +if [ -z "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" ] ; then + 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 +fi + +# TODO: check privilege + +# read value for set bluetooth power +read value +export value + +if [ -n "$HALD_UNAME_S" -a -x ./$HALD_UNAME_S/hal-system-killswitch-set-power-$HALD_UNAME_S ]; then + exec ./$HALD_UNAME_S/hal-system-killswitch-set-power-$HALD_UNAME_S $@ +else + echo "org.freedesktop.Hal.Device.UnknownError" >&2 + echo "No back-end for your operating system" >&2 + exit 1 +fi |