[node-patches] Change in ovirt-node[master]: Clean up fstab entries for NFS when wiping the config
rbarry at redhat.com
rbarry at redhat.com
Thu Sep 10 15:08:10 UTC 2015
Ryan Barry has uploaded a new change for review.
Change subject: Clean up fstab entries for NFS when wiping the config
......................................................................
Clean up fstab entries for NFS when wiping the config
Don't leave multiple lines in fstab pointing to different NFS
targets
Change-Id: I35aae22d684783fb52597e62d9d197af852f036b
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/config/defaults.py
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/26/46026/1
diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index 2d625ad..64a6c9f 100755
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -1114,6 +1114,16 @@
[aug.remove(v) for v in vals.keys() if vals[v] is not None]
aug.save()
+ fstab_entry = None
+ for entry in aug.match("/files/etc/fstab/*"):
+ if aug.get(entry + "/file") == "/var/run/kdump-nfs":
+ fstab_entry = entry
+ break
+
+ if fstab_entry:
+ aug.remove(fstab_entry)
+ aug.save()
+
class LocalKdumpConfig(utils.Transaction.Element):
title = "Setting local kdump config"
--
To view, visit https://gerrit.ovirt.org/46026
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I35aae22d684783fb52597e62d9d197af852f036b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list