Skip to content

Instantly share code, notes, and snippets.

@LuKePicci
Created April 17, 2020 23:47
Show Gist options
  • Save LuKePicci/0bd3a230beb190d9be001a87fb5aa82e to your computer and use it in GitHub Desktop.
Save LuKePicci/0bd3a230beb190d9be001a87fb5aa82e to your computer and use it in GitHub Desktop.
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
boot_run_hook preinit_mount_modroot
[ -f /modupgrade.tgz ] && {
echo "- mod config restore -"
cd /
tar xzf /modupgrade.tgz
}
}
[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_mount_root
. /rom/lib/preinit/95_restore_version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment