#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. #Log file rc.local #exec 2> /tmp/rc.log # send stderr from rc.local to a log file #exec 1>&2 # send stdout to the same log file #set -x # tell sh to display commands before execution #chmod 666 /tmp/rc.log #Variable root boot MountRW=`mount` MountRW=`echo "$MountRW" | grep ' on / type ext4 (rw)'` MountRW=`echo "$MountRW" | cut -f1 -d " " ` insmod /lib/modules/rkwifi.ko #Resize NAND" if [ -e /resize.fs ]; then rm -f /resize.fs resize2fs -p /dev/mtdblock2 mount -o remount,rw /dev/mtdblock2 rm -f /resize.fs echo "Fix module load" depmod -a echo "Reboot OS" touch /forcefsck reboot fi #Mount rootfs test if touch /mnt.rw; then echo "OK... mount rw" rm /mnt.rw echo "Fix WiFi" rfkill block all rfkill unblock all rfkill block all echo "Fix sound" chmod o+rw /dev/snd/[c-t]* exit 0 else echo "Error... mount ro" mount -o remount,rw $MountRW touch /forcefsck reboot fi exit 0
echo "Fix WiFi"
rfkill block all
rfkill unblock all
rfkill block all
Comment