From 629deb3c0d18aea5a24738af84157ec6ab62a71c Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 4 Jan 2008 04:20:24 +0000 Subject: [PATCH] First check for arguments before even getting an IP address git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10110 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../adm5120/router_le/base-files/sbin/wget2nand | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/target/linux/adm5120/router_le/base-files/sbin/wget2nand b/target/linux/adm5120/router_le/base-files/sbin/wget2nand index 9b27b579b..8843c286e 100755 --- a/target/linux/adm5120/router_le/base-files/sbin/wget2nand +++ b/target/linux/adm5120/router_le/base-files/sbin/wget2nand @@ -13,17 +13,18 @@ exit 1 } -# first get an address for br-lan using udhcpc -killall udhcpc -/sbin/udhcpc -i br-lan - # need to find the wget server from the command line url=$1 [ -z "$url" ] && { - echo "No URL specified for image TGZ" - echo "Usage : $0 URL" - exit 1 -} + echo "No URL specified for image TGZ" + echo "Usage : $0 URL" + exit 1 +} + + +# first get an address for br-lan using udhcpc +killall udhcpc +/sbin/udhcpc -i br-lan boot="$(find_mtd_part 'RouterBoard NAND Boot')" main="$(find_mtd_part 'rootfs')" -- 2.20.1