openwrtv3/package/base-files/files/lib/preinit/80_mount_root
Felix Fietkau bc1fc688af base-files: keep sysupgrade.tgz until /etc/init.d/done has been called
This makes interrupted boots after sysupgrade more reliable

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44941
2015-03-22 15:11:20 +00:00

15 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