zcip.script: fix $ip environment variable
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 9 Aug 2011 02:41:00 +0000 (04:41 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 9 Aug 2011 02:41:00 +0000 (04:41 +0200)
The environment variable containing the IP address allocated by zcip
is "ip" and not "IP".

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
examples/zcip.script

index 988e542a4c2fe79d8a0806e4349141006a07c45a..e543c304e86dce178ff36780e1be7eeb88f954a8 100755 (executable)
@@ -20,9 +20,9 @@ config)
                exit 1
        fi
        # remember $ip for $interface, to use on restart
-       if [ "x$IP" != x -a -w "$IP.$interface" ]
+       if [ "x$ip" != x -a -w "$ip.$interface" ]
        then
-               echo $ip > "$IP.$interface"
+               echo $ip > "$ip.$interface"
        fi
        exec ip address add dev $interface \
                scope link local "$ip/16" broadcast +