2019-01-15 22:41:31 +00:00
|
|
|
#!@shell@
|
2012-02-24 01:35:59 +00:00
|
|
|
|
|
|
|
# Executes a hook in case of a change to the
|
|
|
|
# rfkill state. The hook can be passed as
|
|
|
|
# environment variable, or present as executable
|
|
|
|
# file.
|
|
|
|
|
|
|
|
if [ -z "$RFKILL_STATE" ]; then
|
|
|
|
echo "rfkill-hook: error: RFKILL_STATE variable not set"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-01-27 14:45:18 +00:00
|
|
|
if [ -x /run/current-system/etc/rfkill.hook ]; then
|
|
|
|
exec /run/current-system/etc/rfkill.hook
|
2012-02-24 01:35:59 +00:00
|
|
|
elif [ ! -z "$RFKILL_HOOK" ]; then
|
|
|
|
exec $RFKILL_HOOK
|
|
|
|
else
|
|
|
|
echo "rfkill-hook: $RFKILL_STATE"
|
2014-01-27 14:45:18 +00:00
|
|
|
fi
|