aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-12-05 08:58:18 +0000
committerJohn Crispin <blogic@openwrt.org>2014-12-05 08:58:18 +0000
commit10f8bcadcd7f4e985194fce1abc3bd99cbd803bb (patch)
treefb37cda1e66f1c8a915414cf65b568d418c03ec3
parent610b545418e9151055d3b86df58aafa96205b7eb (diff)
downloadupstream-10f8bcadcd7f4e985194fce1abc3bd99cbd803bb.tar.gz
upstream-10f8bcadcd7f4e985194fce1abc3bd99cbd803bb.tar.bz2
upstream-10f8bcadcd7f4e985194fce1abc3bd99cbd803bb.zip
octeon: sysupgrade: rename old kernel after mounting /boot
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43523 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xtarget/linux/octeon/base-files/lib/upgrade/platform.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index 1df3d17e24..8d6f9a1cf4 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -44,18 +44,19 @@ platform_do_upgrade() {
local kernel_length=`(tar xf $tar_file sysupgrade-erlite/kernel -O | wc -c) 2> /dev/null`
local rootfs_length=`(tar xf $tar_file sysupgrade-erlite/root -O | wc -c) 2> /dev/null`
+ mkdir -p /boot
+ mount -t vfat /dev/sda1 /boot
+
[ -f /boot/vmlinux.64 -a ! -L /boot/vmlinux.64 ] && {
mv /boot/vmlinux.64 /boot/vmlinux.64.previous
mv /boot/vmlinux.64.md5 /boot/vmlinux.64.md5.previous
}
- mkdir -p /boot
- mount -t vfat /dev/sda1 /boot
tar xf $tar_file sysupgrade-erlite/kernel -O > /boot/vmlinux.64
md5sum /boot/vmlinux.64 | cut -f1 -d " " > /boot/vmlinux.64.md5
tar xf $tar_file sysupgrade-erlite/root -O | dd of="${rootfs}" bs=4096
sync
- umount /mnt
+ umount /boot
return 0
;;
esac