80_mount_root 384 B

123456789101112131415161718
  1. #!/bin/sh
  2. # Copyright (C) 2006 OpenWrt.org
  3. # Copyright (C) 2010 Vertical Communications
  4. do_mount_root() {
  5. fs-state start
  6. boot_run_hook preinit_mount_root
  7. [ -f /sysupgrade.tgz ] && {
  8. echo "- config restore -"
  9. cd /
  10. mv sysupgrade.tgz /tmp
  11. tar xzf /tmp/sysupgrade.tgz
  12. rm -f /tmp/sysupgrade.tgz
  13. sync
  14. }
  15. }
  16. [ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_mount_root