Skip to content

Instantly share code, notes, and snippets.

@cxfksword
Created April 20, 2017 16:20
Show Gist options
  • Save cxfksword/ad8c7796cb9a0f2e025e8f42640c3469 to your computer and use it in GitHub Desktop.
Save cxfksword/ad8c7796cb9a0f2e025e8f42640c3469 to your computer and use it in GitHub Desktop.
asus stock fireware jffs start script
https://github.com/Entware-ng/Entware-ng/wiki/Install-on-Asus-stock-firmware
cat << EOF > /tmp/script_usbmount.tmp
if [ \$1 = "/tmp/mnt/MYPART" ]
then
ln -sf \$1 /tmp/opt
/opt/etc/init.d/rc.unslung start
fi
EOF
nvram set script_usbmount="`cat /tmp/script_usbmount.tmp`"
cat << EOF > /tmp/script_usbumount.tmp
if [ \$1 = "/tmp/mnt/MYPART" ]
then
/opt/etc/init.d/rc.unslung stop
fi
EOF
nvram set script_usbumount="`cat /tmp/script_usbumount.tmp`"
nvram commit
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment