79_move_config 319 B

12345678910111213141516
  1. move_config() {
  2. local partdev
  3. . /lib/upgrade/common.sh
  4. if export_bootdevice && export_partdevice partdev 1; then
  5. if mount -o rw,noatime "/dev/$partdev" /mnt; then
  6. if [ -f "/mnt/$BACKUP_FILE" ]; then
  7. mv -f "/mnt/$BACKUP_FILE" /
  8. fi
  9. umount /mnt
  10. fi
  11. fi
  12. }
  13. boot_hook_add preinit_mount_root move_config