Created
January 20, 2017 22:34
-
-
Save rogeliodh/0d2b7850b801bb619f59c99af139fac1 to your computer and use it in GitHub Desktop.
[X1ii] Replacement mmc.sh to run [sdcard]/custom.sh script on boot [tested with FW < 1.5.6]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$ACTION" == "add" ] | |
then | |
echo add > /tmp/mmc_add | |
/bin/mount -t vfat -o iocharset=utf8,shortname=mixed /dev/$1 /mnt/mmc | |
if [ "$?" != "0" ] | |
then | |
/bin/mount -o iocharset=utf8 /dev/$1 /mnt/mmc | |
fi | |
if [ "$?" != "0" ] | |
then | |
ntfs-3g /dev/$1 /mnt/mmc | |
fi | |
sh /mnt/mmc/custom.sh & | |
elif [ "$ACTION" == "remove" ] | |
then | |
rm /tmp/mmc_add -f | |
/bin/umount /mnt/mmc | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment