[source] octeon: only copy sysupgrade file if present

LEDE Commits lede-commits at lists.infradead.org
Wed Feb 15 00:37:19 PST 2017


blogic pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/30a4966053562dd252a302c831e780cce8bbdec6

commit 30a4966053562dd252a302c831e780cce8bbdec6
Author: John Crispin <john at phrozen.org>
AuthorDate: Wed Feb 15 06:36:21 2017 +0100

    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 at phrozen.org>
---
 target/linux/octeon/base-files/lib/preinit/79_move_config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 669999e..4ab321b 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



More information about the lede-commits mailing list