90_restore_config 311 B

1234567891011121314151617
  1. #!/bin/sh
  2. # Copyright (C) 2006 OpenWrt.org
  3. # Copyright (C) 2010 Vertical Communications
  4. restore_config() {
  5. [ -f /sysupgrade.tgz ] && {
  6. echo "- config restore -"
  7. cd /
  8. mv sysupgrade.tgz /tmp
  9. tar xzf /tmp/sysupgrade.tgz
  10. rm -f /tmp/sysupgrade.tgz
  11. sync
  12. }
  13. }
  14. boot_hook_add preinit_main restore_config