[node-patches] Change in ovirt-node[master]: for plugins, store variables in /etc/default/ovirt

mburns at redhat.com mburns at redhat.com
Mon Mar 25 16:06:25 UTC 2013


Michael Burns has uploaded a new change for review.

Change subject: for plugins, store variables in /etc/default/ovirt
......................................................................

for plugins, store variables in /etc/default/ovirt

Store kernel commandline arguments for plugins in /etc/default/ovirt
This allows a system like puppet to be used to pre-seed the variables
rather than reading /proc/cmdline directly.

Change-Id: I7da94b3f8f0ea2d6f9abe8514a49cc5dc73c429b
Signed-off-by: Mike Burns <mburns at redhat.com>
---
M scripts/ovirt-init-functions.sh
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/30/13330/1

diff --git a/scripts/ovirt-init-functions.sh b/scripts/ovirt-init-functions.sh
index df51f74..55c0c98 100644
--- a/scripts/ovirt-init-functions.sh
+++ b/scripts/ovirt-init-functions.sh
@@ -389,6 +389,10 @@
 
     # save boot parameters like console= for local disk boot menu
     bootparams=
+
+    # a list of plugin variables that were set
+    plugin_vars=
+
     cat /etc/system-release >> $OVIRT_LOGFILE
 
     for i in $(cat /proc/cmdline); do
@@ -762,6 +766,9 @@
             varname=${i%=*}
             if ! grep -qw $varname /etc/ovirt-commandline.d/* 2>/dev/null; then
                 bootparams="$bootparams $i"
+            else
+
+                plugin_vars="$plugin_vars $varname"
             fi
             ;;
         esac
@@ -810,7 +817,7 @@
     fi
     log "Updating $OVIRT_DEFAULTS"
     tmpaug=$(mktemp)
-    for p in $params; do
+    for p in $params $plugin_vars; do
         PARAM=$(uc $p)
         value=$(ptr $p)
         if [ -n "$value" -o $p = 'init' -o $p = 'bootif' -o $p = 'upgrade' -o $p = 'install' ]; then


--
To view, visit http://gerrit.ovirt.org/13330
To unsubscribe, visit http://gerrit.ovirt.org/settings

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