79_move_config 396 B

12345678910111213141516171819
  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. mkdir -p /boot
  8. mount -t ext4 -o rw,noatime "/dev/$partdev" /boot
  9. if [ -f /boot/sysupgrade.tgz ]; then
  10. mv -f /boot/sysupgrade.tgz /
  11. fi
  12. mount --bind /boot/boot /boot
  13. fi
  14. }
  15. boot_hook_add preinit_mount_root move_config