Skip to content

Instantly share code, notes, and snippets.

@LuKePicci
Last active April 20, 2020 10:33
Show Gist options
  • Save LuKePicci/c40fac0ddf07233668efaf433d9cb8e7 to your computer and use it in GitHub Desktop.
Save LuKePicci/c40fac0ddf07233668efaf433d9cb8e7 to your computer and use it in GitHub Desktop.
#!/bin/sh
. /rom/usr/sbin/random_seed
mount_root() {
if [ -x /sbin/mount_root-mod ]; then
/sbin/mount_root-mod
else
echo "****************************************************"
echo "* NO mount_root-mod program found *"
echo "* can not mount the modroot filesystem *"
echo "****************************************************"
fi
}
do_mount_root() {
mount_root
[ -f /modupgrade.tgz ] && {
echo "- mod config restore -"
cd /
tar xzf /modupgrade.tgz
}
}
[ -d /tmp/modoverlay ] || do_mount_root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment