[node-patches] Change in ovirt-node[master]: init: Only bind mount files once

fabiand at redhat.com fabiand at redhat.com
Wed Jul 29 12:29:16 UTC 2015


Fabian Deutsch has uploaded a new change for review.

Change subject: init: Only bind mount files once
......................................................................

init: Only bind mount files once

Previously it could happen that files were bind mounted more than once,
becaus they appeared more than once in the /config/files file.
By using sort we prevent this.

The cause - why the files appear more than once - still needs to be fixed.

Change-Id: I24f13f970701eb097bc3418eb8fc61049779ac4c
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1246117
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-functions.in
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/37/44137/1

diff --git a/scripts/ovirt-functions.in b/scripts/ovirt-functions.in
index c35f1c1..9291a87 100644
--- a/scripts/ovirt-functions.in
+++ b/scripts/ovirt-functions.in
@@ -380,7 +380,7 @@
             cp -rv --update /live/config/* /config
         fi
         # bind mount all persisted configs to rootfs
-        for f in $(cat /config/files); do
+        for f in $(sort -u /config/files); do
             if grep -q " $f ext[234]" /proc/mounts ; then
                 # skip if already bind-mounted
                 true


-- 
To view, visit https://gerrit.ovirt.org/44137
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24f13f970701eb097bc3418eb8fc61049779ac4c
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