Yaniv Bronhaim has uploaded a new change for review.
Change subject: Removing vdsm configuration when removing vdsm service ......................................................................
Removing vdsm configuration when removing vdsm service
Before we removed that section only over rhel and we looked for the wrong string. This patch adds sed command for both dist with the current string that is written by vdsmd init script.
Change-Id: Ia8f59375e20efa6b5de8483a12a772f5f0ce3749 Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=902346 Signed-off-by: Yaniv Bronhaim ybronhei@redhat.com --- M vdsm.spec.in 1 file changed, 10 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/11295/1
diff --git a/vdsm.spec.in b/vdsm.spec.in index 632d315..42dfca4 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -514,17 +514,21 @@ %endif
%preun +start_conf_section="## beginning of configuration section by vdsm" +end_conf_section="## end of configuration section by vdsm" + +# Removing vdsm configuration from libvirtd.conf and qemu.conf +/bin/sed -i "/${start_conf_section}/,/${end_conf_section}/d" \ + /etc/libvirt/libvirtd.conf \ + /etc/libvirt/qemu.conf \ + /etc/sysconfig/libvirtd \ + /etc/sysctl.conf + %if 0%{?rhel} if [ "$1" -eq 0 ] then /sbin/service vdsmd stop > /dev/null 2>&1 || : /sbin/chkconfig --del vdsmd - - /bin/sed -i '/# by vdsm$/d' \ - /etc/libvirt/libvirtd.conf \ - /etc/libvirt/qemu.conf \ - /etc/sysconfig/libvirtd \ - /etc/sysctl.conf
/bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ /etc/sysctl.conf
-- To view, visit http://gerrit.ovirt.org/11295 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Ia8f59375e20efa6b5de8483a12a772f5f0ce3749 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim ybronhei@redhat.com