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

fabiand at redhat.com fabiand at redhat.com
Wed Jul 29 13:44:06 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/46/44146/1

diff --git a/scripts/ovirt-functions.in b/scripts/ovirt-functions.in
index b3882ee..3c31e34 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/44146
To unsubscribe, visit https://gerrit.ovirt.org/settings

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



More information about the node-patches mailing list