Skip to content

Instantly share code, notes, and snippets.

@rogeliodh
Created January 20, 2017 22:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogeliodh/0d2b7850b801bb619f59c99af139fac1 to your computer and use it in GitHub Desktop.
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]
#!/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