summaryrefslogtreecommitdiff
path: root/share/examples
diff options
context:
space:
mode:
authorDevin Teske <dteske@FreeBSD.org>2016-02-08 17:47:36 +0000
committerDevin Teske <dteske@FreeBSD.org>2016-02-08 17:47:36 +0000
commit43a45064a0975acef2f95bd0c41eafdcfa6cbafc (patch)
tree8a73f0b06d4ae6932035fa8772317714f434fab4 /share/examples
parent626ddc5125b8dbe81afba1201ad8e0f20005eec2 (diff)
downloadsrc-test2-43a45064a0975acef2f95bd0c41eafdcfa6cbafc.tar.gz
src-test2-43a45064a0975acef2f95bd0c41eafdcfa6cbafc.zip
Notes
Diffstat (limited to 'share/examples')
-rwxr-xr-xshare/examples/jails/jib11
-rwxr-xr-xshare/examples/jails/jng5
2 files changed, 13 insertions, 3 deletions
diff --git a/share/examples/jails/jib b/share/examples/jails/jib
index e48f5c49fda6..890c1682e9c4 100755
--- a/share/examples/jails/jib
+++ b/share/examples/jails/jib
@@ -267,8 +267,15 @@ jib_addm()
10) quad=a ;; 11) quad=b ;; 12) quad=c ;;
13) quad=d ;; 14) quad=e ;; 15) quad=f ;;
esac
- eiface_devid_a=2:$quad$eiface_devid_a
- eiface_devid_b=6:$quad$eiface_devid_b
+ case "$iface_devid" in
+ ?2:*|?6:*)
+ eiface_devid_a=a:$quad$eiface_devid_a
+ eiface_devid_b=e:$quad$eiface_devid_b
+ ;;
+ *)
+ eiface_devid_a=2:$quad$eiface_devid_a
+ eiface_devid_b=6:$quad$eiface_devid_b
+ esac
num=$(( $num >> 4 ))
quad=$(( $num & 15 ))
case "$quad" in
diff --git a/share/examples/jails/jng b/share/examples/jails/jng
index bb63cd675bdf..0d9132e23ff6 100755
--- a/share/examples/jails/jng
+++ b/share/examples/jails/jng
@@ -297,7 +297,10 @@ jng_bridge()
10) quad=a ;; 11) quad=b ;; 12) quad=c ;;
13) quad=d ;; 14) quad=e ;; 15) quad=f ;;
esac
- eiface_devid=2:$quad$eiface_devid
+ case "$iface_devid" in
+ ?2:*) eiface_devid=a:$quad$eiface_devid ;;
+ *) eiface_devid=2:$quad$eiface_devid
+ esac
num=$(( $num >> 4 ))
quad=$(( $num & 15 ))
case "$quad" in