procd: fix parsing of the has_env parameter
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 12 Oct 2014 15:50:01 +0000 (15:50 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 12 Oct 2014 15:50:01 +0000 (15:50 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42883 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/system/procd/files/nand.sh

index 4aa56e3..4894b81 100644 (file)
@@ -122,7 +122,7 @@ nand_upgrade_prepare_ubi() {
                ubiattach -m "$mtdnum"
                sync
                ubidev="$( nand_find_ubi "$CI_UBIPART" )"
-               [ -z "$has_env" ] || {
+               [ "$has_env" -gt 0 ] && {
                        ubimkvol /dev/$ubidev -n 0 -N ubootenv -s 1MiB
                        ubimkvol /dev/$ubidev -n 1 -N ubootenv2 -s 1MiB
                }