Skip to content

Commit 5cb35dd

Browse files
committed
Merge branch 'master' into develop
Bump version to 0.18.1next Conflicts: docs/version.py version version.m4
2 parents c26f351 + 0f9dd60 commit 5cb35dd

File tree

9 files changed

+19
-7
lines changed

9 files changed

+19
-7
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2015-03-13, v0.18.1
2+
* HELPER: Fix a bug in ConfigureNetwork task that caused a syntax error
3+
if the SUBNET was missing for a NIC
14
2015-03-03, v0.18
25
* HELPER: Auto-detect OSFAMILY and ROOT_PARTITION properties if missing
36
* HELPER: Add new CofigureNetwork image configuration task

docs/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.18next"
1+
__version__ = "0.18.1next"

snf-image-helper/networking/freebsd.sh.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ grep -v "ifconfig_$driver$index" "$CONF" > "$tmp_config"
7272
cat "$tmp_config" > "$CONF"
7373

7474
if [ "$ipv4" = 'static' ]; then
75-
echo "ifconfig_$driver$index=\"inet $IP netmask $(cidr2mask "${SUBNET##*/}")\"" >> "$CONF"
75+
netmask=$(cidr2mask "${SUBNET##*/}")
76+
echo "ifconfig_$driver$index=\"inet $IP netmask $netmask\"" >> "$CONF"
7677
if [ -n "$GATEWAY" ]; then
7778
sed -i '/^defaultrouter=/d' "$CONF"
7879
echo "defaultrouter=\"$GATEWAY\"" >> "$CONF"

snf-image-helper/networking/netbsd.sh.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ if [ "$ipv4" != none -o "$ipv6" != none ]; then
7373
fi
7474

7575
if [ "$ipv4" = 'static' ]; then
76-
echo "inet $IP netmask $(cidr2mask "${SUBNET##*/}")" >> "$IFCONFIG"
76+
netmask=$(cidr2mask "${SUBNET##*/}")
77+
echo "inet $IP netmask $netmask" >> "$IFCONFIG"
7778
if [ -n "$GATEWAY" ]; then
7879
sed -i '/^defaultroute=/d' "$RC_CONF"
7980
echo "defaultroute=$GATEWAY" >> "$RC_CONF"

snf-image-helper/networking/openbsd.sh.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ SYSCTL="$SNF_IMAGE_TARGET/etc/sysctl.conf"
6969
cat /dev/null > "$HOSTNAME"
7070

7171
if [ "$ipv4" = 'static' ]; then
72-
echo "inet $IP $(cidr2mask "${SUBNET##*/}") NONE" >> "$HOSTNAME"
72+
netmask=$(cidr2mask "${SUBNET##*/}")
73+
echo "inet $IP $netmask NONE" >> "$HOSTNAME"
7374
if [ -n "$GATEWAY" ]; then
7475
echo "$GATEWAY" > "$MYGATE"
7576
fi

snf-image-helper/networking/redhat.sh.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ echo -e "DEVICE=eth${index}\nONBOOT=yes\nHWADDR=$MAC" > "$IFCFG"
7070
echo "NM_CONTROLLED=yes" >> "$IFCFG"
7171

7272
if [ "$ipv4" = 'static' ]; then
73-
echo -e "BOOTPROTO=static\nIPADDR=$IP\nNETMASK=$(cidr2mask "${SUBNET##*/}")" >> "$IFCFG"
73+
netmask=$(cidr2mask "${SUBNET##*/}")
74+
echo -e "BOOTPROTO=static\nIPADDR=$IP\nNETMASK=$netmask" >> "$IFCFG"
7475
elif [ "$ipv4" = 'dhcp' ]; then
7576
echo -e "BOOTPROTO=dhcp" >> "$IFCFG"
7677
else

snf-image-helper/tasks/50ConfigureNetwork.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ for index in $(seq 0 $((NIC_COUNT-1))); do
9292
done
9393
done
9494

95+
# If the subnet is missing, the card cannot be configure in a static way
96+
if [ -z "${SUBNET}" ]; then
97+
dhcp=yes
98+
fi
99+
95100
if [ -n "${IP}" ]; then
96101
ipv4=yes
97102
fi

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.18next
1+
0.18.1next

version.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
m4_define([devflow_version], [0.18next])
1+
m4_define([devflow_version], [0.18.1next])

0 commit comments

Comments
 (0)