aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2017-02-15 06:36:21 +0100
committerJohn Crispin <john@phrozen.org>2017-02-15 06:36:21 +0100
commitc186a48fcad6d84c7a1ef010e047d16255529663 (patch)
treeaf2e113e41eaad19fe7095e8af6ec580b3849e1c
parent1753720261d6feffd6d71ec9bfa7170499d5c1a2 (diff)
downloadupstream-c186a48fcad6d84c7a1ef010e047d16255529663.tar.gz
upstream-c186a48fcad6d84c7a1ef010e047d16255529663.tar.bz2
upstream-c186a48fcad6d84c7a1ef010e047d16255529663.zip
octeon: only copy sysupgrade file if present
this caused 'mv: can't rename '/mnt/sysupgrade.tgz': No such file or directory' when running sysupgrade -n Signed-off-by: John Crispin <john@phrozen.org>
-rw-r--r--target/linux/octeon/base-files/lib/preinit/79_move_config2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config b/target/linux/octeon/base-files/lib/preinit/79_move_config
index 669999e2e3..4ab321b690 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -5,7 +5,7 @@ move_config() {
case "$(cat /tmp/sysinfo/board_name)" in
erlite)
mount -t vfat /dev/sda1 /mnt
- mv -f /mnt/sysupgrade.tgz /
+ [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
umount /mnt
;;
esac