projects
/
openwrt
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mvebu: base-files: autodetect upgrade device
[openwrt/openwrt.git]
/
target
/
linux
/
mvebu
/
base-files
/
lib
/
preinit
/
79_move_config
diff --git
a/target/linux/mvebu/base-files/lib/preinit/79_move_config
b/target/linux/mvebu/base-files/lib/preinit/79_move_config
index 73ddf09155d3a489b4d9127691cd281275f3206a..64c0cc0eea8a628e9ebd2980878888ad7af87baf 100644
(file)
--- a/
target/linux/mvebu/base-files/lib/preinit/79_move_config
+++ b/
target/linux/mvebu/base-files/lib/preinit/79_move_config
@@
-1,12
+1,13
@@
#!/bin/sh
# Copyright (C) 2015 OpenWrt.org
#!/bin/sh
# Copyright (C) 2015 OpenWrt.org
-BOOTPART=/dev/mmcblk0p1
-
. /lib/functions.sh
. /lib/functions.sh
+. /lib/upgrade/common.sh
move_config() {
move_config() {
- if [ -b $BOOTPART ]; then
+ local partdev
+
+ if export_bootdevice && export_partdevice partdev 1; then
case $(board_name) in
turris-omnia)
insmod nls_cp437
case $(board_name) in
turris-omnia)
insmod nls_cp437
@@
-16,7
+17,7
@@
move_config() {
;;
esac
mkdir -p /boot
;;
esac
mkdir -p /boot
- mount -o rw,noatime
$BOOTPART
/boot
+ mount -o rw,noatime
"/dev/$partdev"
/boot
[ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
umount /boot
fi
[ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
umount /boot
fi