treewide: don't hardcode "sysupgrade.tgz" file name
[openwrt/staging/mkresin.git] / target / linux / tegra / base-files / lib / preinit / 79_move_config
1 #!/bin/sh
2
3 move_config() {
4 local partdev
5
6 . /lib/upgrade/common.sh
7
8 if export_bootdevice && export_partdevice partdev 1; then
9 mkdir -p /boot
10 if mount -o ro,noatime "/dev/$partdev" /boot; then
11 if [ -f "/boot/$BACKUP_FILE" ]; then
12 mount /boot -o remount,rw,noatime
13 mv -f "/boot/$BACKUP_FILE" /
14 fi
15 umount /boot
16 rm -fR /boot
17 fi
18 fi
19 }
20
21 boot_hook_add preinit_mount_root move_config
22