2a451a5efdbed06d9e3ef10aac5799bd96c7e60a
[openwrt/openwrt.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/sysupgrade.tgz ]; then
12 mount /boot -o remount,rw,noatime
13 mv -f /boot/sysupgrade.tgz /
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