[node-patches] Change in ovirt-node[master]: cleanup yum related files generated during installation
mburns at redhat.com
mburns at redhat.com
Thu Jan 17 14:39:11 UTC 2013
Michael Burns has uploaded a new change for review.
Change subject: cleanup yum related files generated during installation
......................................................................
cleanup yum related files generated during installation
* disable all yum repos in /etc/yum.repos.d rather than just
fedora.repo and fedora-updates.repo
* remote yumdb information
rhbz#896532
Change-Id: I60981a3eeb1af43ef4d12005986e39a229d9f49e
Signed-off-by: Mike Burns <mburns at redhat.com>
---
M recipe/common-post.ks
1 file changed, 12 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/54/11154/1
diff --git a/recipe/common-post.ks b/recipe/common-post.ks
index 500b993..29a8d4a 100644
--- a/recipe/common-post.ks
+++ b/recipe/common-post.ks
@@ -243,11 +243,18 @@
useradd -g cim -G sfcb -s /sbin/nologin cim
# disable yum repos by default
-augtool << \EOF_yum
-set /files/etc/yum.repos.d/fedora.repo/fedora/enabled 0
-set /files/etc/yum.repos.d/fedora-updates.repo/updates/enabled 0
-save
-EOF_yum
+rm -f /tmp/yum.aug
+for i in $(augtool match /files/etc/yum.repos.d/*/*/enabled 1); do
+ echo "set $i 0" >> /tmp/yum.aug
+done
+if [ -f /tmp/yum.aug ]; then
+ echo "save" >> /tmp/yum.aug
+ augtool < /tmp/yum.aug
+ rm -f /tmp/yum.aug
+fi
+
+# cleanup yum directories
+rm -rf /var/lib/yum/*
#cleanup tmp directory from cim setup
rm -rf /tmp/cim_schema*
--
To view, visit http://gerrit.ovirt.org/11154
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I60981a3eeb1af43ef4d12005986e39a229d9f49e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>
More information about the node-patches
mailing list