aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-09-14 07:49:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-09-14 07:53:33 +0000
commit3903addeaf7b48d80bc1a47ab739197793059e8a (patch)
tree14ab509ed1915144597d3984bda7b7986314eab3
parentf5f7dc0746f7a4eaf38a6b2cb3beedcacf8da294 (diff)
downloadaports-3903addeaf7b48d80bc1a47ab739197793059e8a.tar.bz2
aports-3903addeaf7b48d80bc1a47ab739197793059e8a.tar.xz
util-vserver: fix setup-vs-guest script for busybox-1.17.x
(cherry picked from commit f323e578cd5941d5eaaed2d46799701b54dd6165)
-rw-r--r--main/util-vserver/APKBUILD4
-rw-r--r--main/util-vserver/setup-vs-guest6
2 files changed, 5 insertions, 5 deletions
diff --git a/main/util-vserver/APKBUILD b/main/util-vserver/APKBUILD
index 5fed8f70c6..d0683fc944 100644
--- a/main/util-vserver/APKBUILD
+++ b/main/util-vserver/APKBUILD
@@ -2,7 +2,7 @@
pkgname=util-vserver
pkgver=0.30.216_pre2882
_realver=0.30.216-pre2883
-pkgrel=0
+pkgrel=1
pkgdesc="Linux-VServer admin utilities"
url="http://www.nongnu.org/util-vserver/"
license="GPL"
@@ -70,4 +70,4 @@ ff8f561f672524eb46fe633f584ef60e ensc_pathprog.patch
da8b70c4fd40e68894b3903ffd121397 validate.patch
04000261fd990a3963b0e98260b481bd alpine.patch
49bca7969cc284adf68e0ef284c0660e setup-vs-template
-1f183cba111f973a9981a35335a55e2e setup-vs-guest"
+253253a488a632d834c1e1ac5424f55b setup-vs-guest"
diff --git a/main/util-vserver/setup-vs-guest b/main/util-vserver/setup-vs-guest
index 2985af96f5..5b71e08067 100644
--- a/main/util-vserver/setup-vs-guest
+++ b/main/util-vserver/setup-vs-guest
@@ -156,9 +156,9 @@ last_ipv4_addr_mask() {
ip addr show dev $_iface | awk '$1 == "inet" {print $2}' | tail -n1
}
-valid_ip() {
+valid_ip_and_prefix() {
[ "$1" ] || return 0
- ipcalc -s $1
+ ipcalc -s -m $1 >/dev/null 2>&1 && ! ipcalc -s -m $1/0 >/dev/null 2>&1
}
# ask for hostname
@@ -208,7 +208,7 @@ ask_ifaceopts() {
_mask=${_last_ip_mask#*/}
while true; do
ask "Enter IP address/mask for $_iface:" $_ip/$_mask
- valid_ip $resp && break
+ valid_ip_and_prefix "$resp" 2>&1 && break
echo "$resp is not a valid IPv4 address/mask"
done
_ip_mask=$resp