2010-01-26 01:11:17 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
|
# Copyright (C) 2010 Vertical Communications
|
|
|
|
|
|
|
|
|
|
do_mount_root() {
|
2014-04-07 23:10:15 +08:00
|
|
|
mount_root
|
2013-04-26 03:02:32 +08:00
|
|
|
boot_run_hook preinit_mount_root
|
|
|
|
|
[ -f /sysupgrade.tgz ] && {
|
|
|
|
|
echo "- config restore -"
|
|
|
|
|
cd /
|
2015-03-22 23:11:20 +08:00
|
|
|
tar xzf /sysupgrade.tgz
|
2020-04-24 22:04:14 +08:00
|
|
|
# Prevent configuration corruption on a power loss
|
|
|
|
|
sync
|
2013-04-26 03:02:32 +08:00
|
|
|
}
|
2012-11-24 04:02:02 +08:00
|
|
|
}
|
2010-01-26 01:11:17 +08:00
|
|
|
|
2013-03-14 02:11:19 +08:00
|
|
|
[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_mount_root
|