aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2018-03-23 15:52:23 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2018-03-23 15:53:20 +0200
commit798cb5aee5812a3dfc458503385db45ab14532fb (patch)
tree988de3fb0594f581cbd7448eb72fbaa4b5bb1550 /main
parentff1427811ee1bec0586af6c5749da1cebf159a53 (diff)
downloadaports-798cb5aee5812a3dfc458503385db45ab14532fb.tar.bz2
aports-798cb5aee5812a3dfc458503385db45ab14532fb.tar.xz
main/vlan: do not fail if iface exists
Diffstat (limited to 'main')
-rw-r--r--main/vlan/APKBUILD4
-rw-r--r--main/vlan/vlan.pre-up6
2 files changed, 6 insertions, 4 deletions
diff --git a/main/vlan/APKBUILD b/main/vlan/APKBUILD
index 958dd5121e..111a5f2a23 100644
--- a/main/vlan/APKBUILD
+++ b/main/vlan/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vlan
pkgver=2.0
-pkgrel=0
+pkgrel=1
pkgdesc="Scripts for configuring VLAN network interfaces"
url="http://wiki.alpinelinux.org/wiki/Vlan"
arch="noarch"
@@ -33,4 +33,4 @@ package() {
sha512sums="f00c8521830b1472f1e71223943c14446d28f2667f7e2fd3690c8402c7d3f34982bc4d27201b3dc9c1eb9a635e38ea23dee6e044487615cbc68ba519d940c0f7 mvlan.post-down
955ccc68398ed2d515f794d5ef4164fec2dcfc4504e2e29d427c1687c8b9d6ecff1ea7247dc751963bb7be1db5025940fb66efef3fb6287aa19fe014088573ac mvlan.pre-up
7a6e74957d2fcfb04023d2cf8246e8889a780171f669ec37a56882276d96fb0219180b37cc51ecd87421bcbd0f0d489602423859a6f5605781f703cf143e5bae vlan.post-down
-d4f0c4d838c716c950e553311bf0171997e9a46cb06d5e35feb9a9f52e13dcf4a1553ccc85aaf771057fef6229fcae29ff23c4e2ce384b0ba68a4b8de6a77fec vlan.pre-up"
+54af6be8962a19f5cc3781ab6e42046c2017b58adc90464fe9e1aeea0e4151792920588c84285c727e104e3232adf1d79b0b7d5edfdd53a76b02a764af555e37 vlan.pre-up"
diff --git a/main/vlan/vlan.pre-up b/main/vlan/vlan.pre-up
index a1a2822376..f72f7cb666 100644
--- a/main/vlan/vlan.pre-up
+++ b/main/vlan/vlan.pre-up
@@ -36,8 +36,10 @@ if ! [ -d /proc/net/vlan ]; then
modprobe 8021q
fi
-ip link set dev "$RAW_DEVICE" up
-ip link add link "$RAW_DEVICE" name "$IFACE" type vlan id "$VLAN_ID"
+if ! [ -e /sys/class/net/$IFACE ]; then
+ ip link set dev "$RAW_DEVICE" up
+ ip link add link "$RAW_DEVICE" name "$IFACE" type vlan id "$VLAN_ID"
+fi
if ! ip link show "$IFACE" >/dev/null; then
echo "Failed to create vlan device $IFACE on device $RAW_DEVICE with tag $VLAN_ID"