mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
bc1fc688af
This makes interrupted boots after sysupgrade more reliable Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44941
16 lines
316 B
Bash
16 lines
316 B
Bash
#!/bin/sh
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
# Copyright (C) 2010 Vertical Communications
|
|
|
|
do_mount_root() {
|
|
mount_root
|
|
boot_run_hook preinit_mount_root
|
|
[ -f /sysupgrade.tgz ] && {
|
|
echo "- config restore -"
|
|
cd /
|
|
tar xzf /sysupgrade.tgz
|
|
}
|
|
}
|
|
|
|
[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_mount_root
|