You are not logged in.
Hello arch community,
I have a sager NP5652 (aka clevo W650RC) laptop which I am setting up with arch. My latest endeavor has been getting airplane mode to work correctly. It doesn't work out of the box, so I have set it up myself by following the instructions on the wiki (I couldn't find the clevo-airplane-mode package in the AUR). It's very straightforward, but nonetheless I would like a sanity check on the script I have written. That is, I'd like to know whether I'm disabling bluetooth and wifi correctly, and if there's anything else I should include in the script which makes my laptop safe to use on a plane. I'm taking my laptop on a plane with me in only 2 weeks, so it would be costly for me to get this wrong Thanks!
#!/bin/sh
# toggles airplane mode
#
# this script requires root access
airplane_mode=$(cat /sys/class/leds/tuxedo::airplane/brightness)
if [ $airplane_mode == "0" ]; then
# disable wifi
nmcli radio wifi off
# disable bluetooth
systemctl stop bluetooth.service
# turn on the airplane mode LED
echo 1 > /sys/class/leds/tuxedo::airplane/brightness
else
# turn off the airplane mode LED
echo 0 > /sys/class/leds/tuxedo::airplane/brightness
# enable bluetooth
systemctl start bluetooth.service
# enable wifi
nmcli radio wifi on
fi
Offline
I would just use rfkill.
Offline