add preinit modularization work by Daniel Dickinson (cshore)
[openwrt/svn-archive/archive.git] / package / base-files / files / lib / preinit / 90_restore_config
1 #!/bin/sh
2 # Copyright (C) 2006 OpenWrt.org
3 # Copyright (C) 2010 Vertical Communications
4
5 restore_config() {
6 [ -f /sysupgrade.tgz ] && {
7 echo "- config restore -"
8 cd /
9 mv sysupgrade.tgz /tmp
10 tar xzf /tmp/sysupgrade.tgz
11 rm -f /tmp/sysupgrade.tgz
12 sync
13 }
14 }
15
16 boot_hook_add preinit_main restore_config
17