[node-patches] Change in ovirt-node[master]: install: Use correct arguments for wipefs

fabiand at redhat.com fabiand at redhat.com
Wed Oct 8 18:55:37 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: install: Use correct arguments for wipefs
......................................................................

install: Use correct arguments for wipefs

wipefs on el7 takes different arguments than wipefs on el6.
A recent patch added arguments (-f) to wipefs which ain't supported on
el6, and thus broke the installation.

Now different arguments are used on el6 and el7.

Change-Id: Ie28f45bda046f386933767e0998a3328ef79a915
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1150377
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirtnode/ovirtfunctions.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/45/33945/1

diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index 1bf00aa..72dd4bf 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -1368,7 +1368,8 @@
     logger.info("Wiping old boot sector")
 #    system_closefds("dd if=/dev/zero of=\""+ drive +"\" bs=1024K count=1 &>>" + OVIRT_TMP_LOGFILE)
     system_closefds("parted -s \""+ drive +"\" mklabel loop &>>" + OVIRT_TMP_LOGFILE)
-    system_closefds("wipefs -af \""+ drive +"\" &>>" + OVIRT_TMP_LOGFILE)
+    system_closefds("which systemctl 2>/dev/null && wipefs -af \""+ drive +"\" >>" + OVIRT_TMP_LOGFILE + "2>&1")
+    system_closefds("which systemctl 2>/dev/null || wipefs -a \""+ drive +"\"  >>" + OVIRT_TMP_LOGFILE + "2>&1")
     ## zero out the GPT secondary header
     #logger.info("Wiping secondary gpt header")
     #disk_kb = subprocess_closefds("sfdisk -s \""+ drive +"\" 2>/dev/null", shell=True, stdout=PIPE, stderr=STDOUT)


-- 
To view, visit http://gerrit.ovirt.org/33945
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie28f45bda046f386933767e0998a3328ef79a915
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list