2
0

79_move_config 378 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # Copyright (C) 2012-2015 OpenWrt.org
  3. move_config() {
  4. local partdev
  5. . /lib/upgrade/common.sh
  6. if export_bootdevice && export_partdevice partdev -1; then
  7. if mount -t vfat -o rw,noatime "/dev/$partdev" /mnt; then
  8. if [ -f /mnt/sysupgrade.tgz ]; then
  9. mv -f /mnt/sysupgrade.tgz /
  10. fi
  11. umount /mnt
  12. fi
  13. fi
  14. }
  15. boot_hook_add preinit_mount_root move_config