at master 454 B view raw
1#!@shell@ 2 3# Executes a hook in case of a change to the 4# rfkill state. The hook can be passed as 5# environment variable, or present as executable 6# file. 7 8if [ -z "$RFKILL_STATE" ]; then 9 echo "rfkill-hook: error: RFKILL_STATE variable not set" 10 exit 1 11fi 12 13if [ -x /run/current-system/etc/rfkill.hook ]; then 14 exec /run/current-system/etc/rfkill.hook 15elif [ ! -z "$RFKILL_HOOK" ]; then 16 exec $RFKILL_HOOK 17else 18 echo "rfkill-hook: $RFKILL_STATE" 19fi