lbuild-nightly.sh does not include build.common
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Sat, 11 Apr 2015 12:22:21 +0000 (14:22 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Sat, 11 Apr 2015 12:22:21 +0000 (14:22 +0200)
build.common
lbuild-initvm.sh
lbuild-nightly.sh

index fe74e12..073e597 100644 (file)
@@ -751,15 +751,3 @@ function yumconf_exclude () {
 $yumexclude_line" $repo
 }
 
-########################################
-# workaround for broken lxc-enter-namespace
-# 1st version was relying on virsh net-dhcp-leases
-# however this was too fragile, would not work for fedora14 containers
-function guest_ipv4() {
-    lxc=$1; shift
-
-    mac=$(virsh -c lxc:/// domiflist $lxc | egrep 'network|bridge' | awk '{print $5;}')
-    # sanity check
-    [ -z "$mac" ] && return 0
-    arp -en | grep "$mac" | awk '{print $1;}'
-}
index 4f6a964..8a303f9 100755 (executable)
@@ -710,6 +710,20 @@ PROFILE
 EOF
 }
 
+########################################
+# workaround for broken lxc-enter-namespace
+# 1st version was relying on virsh net-dhcp-leases
+# however this was too fragile, would not work for fedora14 containers
+# WARNING: this code is duplicated in lbuild-nightly.sh
+function guest_ipv4() {
+    lxc=$1; shift
+
+    mac=$(virsh -c lxc:/// domiflist $lxc | egrep 'network|bridge' | awk '{print $5;}')
+    # sanity check
+    [ -z "$mac" ] && return 0
+    arp -en | grep "$mac" | awk '{print $1;}'
+}
+
 function wait_for_ssh () {
     set -x
     set -e
index 1eb39c8..fd7809a 100755 (executable)
@@ -52,6 +52,20 @@ function logfile () {
     echo /vservers/$slice.log.txt
 }
 
+########################################
+# workaround for broken lxc-enter-namespace
+# 1st version was relying on virsh net-dhcp-leases
+# however this was too fragile, would not work for fedora14 containers
+# WARNING: this code is duplicated in lbuild-initvm.sh
+function guest_ipv4() {
+    lxc=$1; shift
+
+    mac=$(virsh -c lxc:/// domiflist $lxc | egrep 'network|bridge' | awk '{print $5;}')
+    # sanity check
+    [ -z "$mac" ] && return 0
+    arp -en | grep "$mac" | awk '{print $1;}'
+}
+
 # wrap a quick summary of suspicious stuff
 # this is to focus on installation that go wrong
 # use with care, a *lot* of other things can go bad as well