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