Change in vdsm[ovirt-3.3]: Source Route script now checks that the DHCP response is whole
amuller at redhat.com
amuller at redhat.com
Wed Aug 7 19:15:58 UTC 2013
Assaf Muller has uploaded a new change for review.
Change subject: Source Route script now checks that the DHCP response is whole
......................................................................
Source Route script now checks that the DHCP response is whole
Previously we assumed that every DHCP response contains a
gateway. Clearly that's wrong :(
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=994600
Change-Id: I3400b1ef736082ed3d5c42edf8ed5d66e94cce98
Signed-off-by: Assaf Muller <amuller at redhat.com>
---
M vdsm/sourceRoute.sh
1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/17793/1
diff --git a/vdsm/sourceRoute.sh b/vdsm/sourceRoute.sh
index 2dafe39..bb8384e 100755
--- a/vdsm/sourceRoute.sh
+++ b/vdsm/sourceRoute.sh
@@ -3,11 +3,16 @@
timeStamp=`date +%s`
sourceRoute_config() {
- echo "configure" "$new_ip_address" "$new_subnet_mask" "$new_routers" \
- "$interface" > /var/run/vdsm/sourceRoutes/$timeStamp
+ if [ -n "$new_ip_address" ] && [ -n "$new_subnet_mask" ] && \
+ [ -n "$new_routers" ] && [ -n "$interface" ]; then
+ echo "configure" "$new_ip_address" "$new_subnet_mask" "$new_routers" \
+ "$interface" > /var/run/vdsm/sourceRoutes/$timeStamp
+ fi
}
sourceRoute_restore() {
- echo "remove" "$interface" > \
- /var/run/vdsm/sourceRoutes/$timeStamp
+ if [ -n "$interface" ]; then
+ echo "remove" "$interface" > \
+ /var/run/vdsm/sourceRoutes/$timeStamp
+ fi
}
--
To view, visit http://gerrit.ovirt.org/17793
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3400b1ef736082ed3d5c42edf8ed5d66e94cce98
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Assaf Muller <amuller at redhat.com>
More information about the vdsm-patches
mailing list