[node-patches] Change in ovirt-node[master]: [RFC] pkg: Remove node-config (and references to it)
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Fri May 31 10:18:35 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: [RFC] pkg: Remove node-config (and references to it)
......................................................................
[RFC] pkg: Remove node-config (and references to it)
Seems to be unused.
Change-Id: Ibc9015c3d36db9519e1182c10f921f3fada9802e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=969143
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M ovirt-node.spec.in
M scripts/Makefile.am
D scripts/node-config
M scripts/ovirt-functions.in
M scripts/ovirt-init-functions.sh.in
D scripts/ovirt-rpmquery
M services/init.d/ovirt-awake
M services/ovirt-awake.service
M services/ovirt-cim.service
M services/ovirt.service
M src/ovirtnode/ovirtfunctions.py
11 files changed, 1 insertion(+), 143 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/46/15246/1
diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in
index 956d268..0e445bf 100644
--- a/ovirt-node.spec.in
+++ b/ovirt-node.spec.in
@@ -480,7 +480,6 @@
%{mgmt_scripts_dir}
%{_sysconfdir}/ovirt-config-boot.d
%exclude %{_sysconfdir}/ovirt-config-boot.d/snmp_autoinstall.py*
-%config(noreplace) %{_sysconfdir}/sysconfig/node-config
%if %{is_f16}
%{_unitdir}/libvirtd.service
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 2a04255..8806d1d 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -15,11 +15,7 @@
# MA 02110-1301, USA. A copy of the GNU General Public License is
# also available at http://www.gnu.org/copyleft/gpl.html.
-nodeconfdir = $(sysconfdir)/sysconfig
localboottriggerdir=$(sysconfdir)/ovirt-config-boot.d
-
-dist_nodeconf_DATA = \
- node-config
dist_sbin_SCRIPTS = \
persist \
diff --git a/scripts/node-config b/scripts/node-config
deleted file mode 100644
index 0b37118..0000000
--- a/scripts/node-config
+++ /dev/null
@@ -1,18 +0,0 @@
-# node configuration
-
-# defines the node's runtime mode, unless overridden
-# on the kernel command line
-# allowed values are:
-# ovirt - managed by an oVirt management server
-# none - standalone, unmamanged mode
-# managed - managed by another server type
-OVIRT_RUNTIME_MODE="none"
-
-# the management server hostname or address
-OVIRT_MANAGEMENT_SERVER=""
-
-# the maangement server port
-OVIRT_MANAGEMENT_PORT=""
-
-# the keytab directory
-KEYTAB_FILE=/etc/libvirt/krb5.tab
diff --git a/scripts/ovirt-functions.in b/scripts/ovirt-functions.in
index 55a92f0..737aeb4 100644
--- a/scripts/ovirt-functions.in
+++ b/scripts/ovirt-functions.in
@@ -9,12 +9,9 @@
# label of the oVirt partition
OVIRT_LABEL=OVIRT
# configuration values are loaded in the following order:
-# 1. /etc/sysconfig/node-config sets the default values
-# 2. /etc/default/ovirt is loaded to override defaults with karg values
-NODE_SYSCONFIG=/etc/sysconfig/node-config
+# 1. /etc/default/ovirt is loaded to override defaults with karg values
OVIRT_DEFAULTS=/etc/default/ovirt
-if [ -f "$NODE_SYSCONFIG" ]; then . "$NODE_SYSCONFIG"; fi
if [ -f $OVIRT_DEFAULTS ]; then . $OVIRT_DEFAULTS; fi
# fallback when default is empty
diff --git a/scripts/ovirt-init-functions.sh.in b/scripts/ovirt-init-functions.sh.in
index cd75d3e..e97dfb5 100644
--- a/scripts/ovirt-init-functions.sh.in
+++ b/scripts/ovirt-init-functions.sh.in
@@ -26,10 +26,8 @@
. @DRACUTDIR@/91ovirtnode/ovirt-boot-functions
-NODE_CONFIG=/etc/sysconfig/node-config
VAR_SUBSYS_OVIRT_EARLY=/var/lock/subsys/ovirt-early
-VAR_SUBSYS_NODECONFIG=/var/lock/subsys/node-config
VAR_SUBSYS_OVIRT_POST=/var/lock/subsys/ovirt-post
VAR_SUBSYS_OVIRT_CIM=/var/lock/subsys/ovirt-cim
VAR_SUBSYS_OVIRT=/var/lock/subsys/ovirt
@@ -165,7 +163,6 @@
}
start_ovirt_early () {
- [ -f "$VAR_SUBSYS_NODECONFIG" ] && exit 0
{
log "Starting ovirt-early"
_start_ovirt_early
@@ -947,9 +944,7 @@
start_ovirt_awake () {
local RC=0
- [ -f "$VAR_SUBSYS_NODECONFIG" ] && exit 0
{
- touch $VAR_SUBSYS_NODECONFIG
log "Starting ovirt-awake."
case "$OVIRT_RUNTIME_MODE" in
"none")
@@ -969,8 +964,6 @@
fi
;;
esac
-
- rm -f $VAR_SUBSYS_NODECONFIG
log "Completed ovirt-awake: RETVAL=$RC"
} >> $OVIRT_LOGFILE 2>&1
@@ -1234,7 +1227,6 @@
# persist selected configuration files
ovirt_store_config \
/etc/node.d \
- /etc/sysconfig/node-config \
/etc/ssh/ssh_host*_key*
. /usr/libexec/ovirt-functions
diff --git a/scripts/ovirt-rpmquery b/scripts/ovirt-rpmquery
deleted file mode 100755
index 4e13726..0000000
--- a/scripts/ovirt-rpmquery
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash
-#
-# rpm query replacement for the Node image without rpmdb
-# list of RPMs is stored during the image creatation in /rpm-qa.txt
-# only rpm -q is available, any other option returns error
-
-PROG=$(basename $0)
-# rpmdb snapshot created during image creation:
-# rpm -qa --qf '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n'
-RPMDB="/rpm-qa.txt"
-if [ ! -e $RPMDB ]; then
- echo "$PROG: $RPMDB not found"
- exit 2
-fi
-
-OPTS=$(getopt -n $PROG -o qav --long query,all,quiet,verbose,qf:,queryformat: -- "$@")
-eval set -- $OPTS
-
-query=
-all=
-qf=
-quiet=
-verbose=
-while [ "$#" -gt 0 ]; do
- case "$1" in
- -q|--query) query=1;;
- -a|--all) all=1;;
- --qf|--queryformat) qf="$2"; shift;;
- --quiet) quiet=1;;
- -v|--verbose) verbose=1;;
- --) shift; break;;
- *) echo "$PROG: invalid option, only --query is available"
- exit 2;;
- esac
- shift
-done
-
-function print_pkg() {
- local pkg="$1"
- local regex
- if [ "$pkg" ]; then
- regex="^$pkg"$'\t'
- else
- regex=""
- fi
-
- rc=0
- if [ "$quiet" ]; then
- grep -E -q "$regex" $RPMDB || rc=1
- elif [ "$qf" ]; then
- # actual queryformat is ignored
- if ! grep -E "$regex" $RPMDB; then
- echo "package $pkg is not installed"
- rc=1
- fi
- else
- awk -v p="$regex" '
- BEGIN { rc=1 }
- match($0,p) { print $1"-"$2"-"$3; rc=0 } END { exit rc }
- ' $RPMDB || rc=1
- fi
- return $rc
-}
-
-
-if [ "$query" ]; then
- if [ "$#" -eq 0 ]; then
- if [ "$all" ]; then
- print_pkg ""
- exit
- else
- echo "$PROG: no arguments given for query"
- exit 1
- fi
- fi
- rc=0
- for pkg in "$@"; do
- print_pkg "$pkg" || rc=1
- done
-else
- echo "$PROG: invalid option, only --query is available"
- rc=1
-fi
-
-exit $rc
diff --git a/services/init.d/ovirt-awake b/services/init.d/ovirt-awake
index fea91a6..ce56af8 100755
--- a/services/init.d/ovirt-awake
+++ b/services/init.d/ovirt-awake
@@ -28,8 +28,6 @@
### END INIT INFO
# Source functions library
-# config: /etc/sysconfig/node-config
-
. /usr/libexec/ovirt-init-functions.sh
prog=ovirt-awake
diff --git a/services/ovirt-awake.service b/services/ovirt-awake.service
index 1034ed9..e71903d 100644
--- a/services/ovirt-awake.service
+++ b/services/ovirt-awake.service
@@ -6,7 +6,6 @@
[Service]
Type=oneshot
RemainAfterExit=yes
-EnvironmentFile=-/etc/sysconfig/node-config
ExecStart=/usr/libexec/ovirt-init-functions.sh start_ovirt_awake
ExecStop=/usr/libexec/ovirt-init-functions.sh stop_ovirt_awake
diff --git a/services/ovirt-cim.service b/services/ovirt-cim.service
index fe32ffe..2a1eba0 100644
--- a/services/ovirt-cim.service
+++ b/services/ovirt-cim.service
@@ -6,7 +6,6 @@
[Service]
Type=oneshot
RemainAfterExit=yes
-EnvironmentFile=-/etc/sysconfig/node-config
ExecStart=/usr/libexec/ovirt-init-functions.sh start_ovirt_cim
ExecStop=/usr/libexec/ovirt-init-functions.sh stop_ovirt_cim
diff --git a/services/ovirt.service b/services/ovirt.service
index a3c8bac..a5a4ae2 100644
--- a/services/ovirt.service
+++ b/services/ovirt.service
@@ -6,7 +6,6 @@
[Service]
Type=oneshot
RemainAfterExit=yes
-#EnvironmentFile=-/etc/sysconfig/node-config
ExecStart=/usr/libexec/ovirt-init-functions.sh start_ovirt
ExecStop=/usr/libexec/ovirt-init-functions.sh stop_ovirt
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index ee47286..26a47f5 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -47,9 +47,7 @@
# label of the oVirt partition
OVIRT_LABEL="OVIRT"
# configuration values are loaded in the following order:
-# 1. /etc/sysconfig/node-config sets the default values
# 2. /etc/default/ovirt is loaded to override defaults with karg values
-NODE_SYSCONFIG="/etc/sysconfig/node-config"
OVIRT_DEFAULTS="/etc/default/ovirt"
aug = augeas.Augeas()
# workaround for bind-mounted files
@@ -70,22 +68,6 @@
def parse_defaults():
global OVIRT_VARS
- if os.path.exists(NODE_SYSCONFIG):
- try:
- f = open(NODE_SYSCONFIG, 'r')
- for line in f:
- try:
- line = line.strip()
- key, value = line.split("\"", 1)
- key = key.strip("=")
- key = key.strip()
- value = value.strip("\"")
- OVIRT_VARS[key] = value
- except:
- pass
- f.close()
- except:
- pass
f = open(OVIRT_DEFAULTS, 'r')
for line in f:
--
To view, visit http://gerrit.ovirt.org/15246
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc9015c3d36db9519e1182c10f921f3fada9802e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list