Works fine on the XO-1.5 too01micko wrote:mavrothal and others who want to try
I have vastly simplified the 'airplane mode' to just 1 script, it works fine on xo-1 and no reason it wont on xo-1.5. It is based on tempestuous' and jemimah's work just flipping the switch in /sys/class/rfkill/rfkill0/state
However, you need to incorporate the trick with moving /etc/powerd/postresume.d/reconnect.sh out and in of postresume.d folder because otherwise the XO will reconnect after a suspend cycle (rather common in an airplane ) and will not reconnect after suspend if you leave it out when exiting airplane mode.
eg
Code: Select all
if [[ $WIFISTATE = 1 ]];then
ifconfig eth0 down
echo 0 > /sys/class/rfkill/rfkill0/state
mv /etc/powerd/postresumse.d/reconnect.sh /etc/powerd
Xdialog --timeout 5 --msgbox "Wireless conectivity is off" 0 0 0
else Xdialog --timeout 5 --msgbox "Your wireless conectivity is already off" 0 0 0
fi
Code: Select all
if [[ $WIFISTATE = 0 ]];then
echo 1 > /sys/class/rfkill/rfkill0/state
mv /etc/powerd/reconnect.sh /etc/powerd/postresume.d
sleep 1
ifconfig eth0 up 2>/dev/null
sleep 1
/usr/local/apps/Connect/AppRun --connect &