Faidon Liambotis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/357618 )
Change subject: labs bootstrapvz/vmbuilder: avoid hardcoding eth0 ...................................................................... labs bootstrapvz/vmbuilder: avoid hardcoding eth0 grep domain-name against /var/lib/dhcp/dhclient.*.leases instead of dhclient.eth0.leases, in order to avoid hardcoding eth0. Since they don't have another network interface (and even less so one with dhclient running), this should be a no-op. Change-Id: If7219cdb6c9cc24fb856a2f37ad4dbd2c61e318f --- M modules/labs_bootstrapvz/files/firstboot.sh M modules/labs_vmbuilder/files/firstboot.sh 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/357618/1 diff --git a/modules/labs_bootstrapvz/files/firstboot.sh b/modules/labs_bootstrapvz/files/firstboot.sh index 1870bef..3d4a185 100644 --- a/modules/labs_bootstrapvz/files/firstboot.sh +++ b/modules/labs_bootstrapvz/files/firstboot.sh @@ -84,7 +84,7 @@ if [ -z $domain ]; then echo "hostname -d failed, trying to parse dhcp lease" - domain=`grep "option domain-name " /var/lib/dhcp/dhclient.eth0.leases | head -n1 | cut -d \" -f2` + domain=`grep "option domain-name " /var/lib/dhcp/dhclient.*.leases | head -n1 | cut -d \" -f2` fi if [ -z $domain ]; then diff --git a/modules/labs_vmbuilder/files/firstboot.sh b/modules/labs_vmbuilder/files/firstboot.sh index 5165934..dd16c60 100644 --- a/modules/labs_vmbuilder/files/firstboot.sh +++ b/modules/labs_vmbuilder/files/firstboot.sh @@ -50,7 +50,7 @@ if [ -z $domain ]; then echo "hostname -d failed, trying to parse dhcp lease" - domain=`grep "option domain-name " /var/lib/dhcp/dhclient.eth0.leases | head -n1 | cut -d \" -f2` + domain=`grep "option domain-name " /var/lib/dhcp/dhclient.*.leases | head -n1 | cut -d \" -f2` fi if [ -z $domain ]; then -- To view, visit https://gerrit.wikimedia.org/r/357618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7219cdb6c9cc24fb856a2f37ad4dbd2c61e318f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis <fai...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits