From: John Crispin Date: Wed, 15 Feb 2017 05:36:21 +0000 (+0100) Subject: octeon: only copy sysupgrade file if present X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=30a4966053562dd252a302c831e780cce8bbdec6;p=librecmc%2Flibrecmc.git 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 --- 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