]> xenbits.xensource.com Git - people/aperard/centos-package-xen.git/commitdiff
Use xencommons rather than distro-specific initscripts
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Fri, 12 Dec 2014 12:27:06 +0000 (12:27 +0000)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Fri, 12 Dec 2014 12:39:25 +0000 (12:39 +0000)
The xenconsoled and xenstored initscripts duplicate functionality in
xencommons, but not all of it.  Switch to using the upstream initscripts.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
SOURCES/init.xenconsoled [deleted file]
SOURCES/init.xenstored [deleted file]
SOURCES/sysconfig.xenconsoled [deleted file]
SOURCES/sysconfig.xenstored [deleted file]
SPECS/xen.spec

diff --git a/SOURCES/init.xenconsoled b/SOURCES/init.xenconsoled
deleted file mode 100755 (executable)
index fe0defd..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/bash
-#
-# xenconsoled  Script to start and stop the Xen xenconsoled daemon
-#
-# Author:       Daniel P. Berrange <berrange@redhat.com>
-#
-# chkconfig: 2345 97 01
-# description: Starts and stops the Xen control daemon.
-### BEGIN INIT INFO
-# Provides:          xenconsoled
-# Required-Start:    $syslog $remote_fs
-# Should-Start:
-# Required-Stop:     $syslog $remote_fs xenstored
-# Should-Stop:
-# Default-Start:     3 4 5
-# Default-Stop:      0 1 2 6
-# Default-Enabled:   yes
-# Short-Description: Start/stop xenconsoled
-# Description:       Starts and stops the Xen xenconsoled daemon.
-### END INIT INFO
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-if [ ! -d /proc/xen ]; then
-       exit 0
-fi
-if ! grep -q "control_d" /proc/xen/capabilities ; then
-       exit 0
-fi
-
-# Default config params
-XENCONSOLED_LOG_HYPERVISOR=no
-XENCONSOLED_LOG_GUESTS=no
-XENCONSOLED_LOG_DIR=/var/log/xen/console
-XENCONSOLED_ARGS=
-
-# User customized params
-test -f /etc/sysconfig/xenconsoled && . /etc/sysconfig/xenconsoled
-
-XENCONSOLED_LOG=none
-if [ "$XENCONSOLED_LOG_HYPERVISOR" = "yes" ]
-then
-        if [ "$XENCONSOLED_LOG_GUESTS" = "yes" ]
-        then
-                XENCONSOLED_LOG=all
-        else
-                XENCONSOLED_LOG=hv
-        fi
-else
-        if [ "$XENCONSOLED_LOG_GUESTS" = "yes" ]
-        then
-                XENCONSOLED_LOG=guest
-        fi
-fi
-
-start() {
-       echo -n $"Starting xenconsoled daemon: "
-        /usr/sbin/xenconsoled --log=$XENCONSOLED_LOG --log-dir=$XENCONSOLED_LOG_DIR $XENCONSOLED_ARGS
-       RETVAL=$?
-       test $RETVAL = 0 && echo_success || echo_failure
-        echo
-        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xenconsoled
-}
-
-stop() {
-       echo -n $"Stopping xenconsoled daemon: "
-       killproc xenconsoled > /dev/null
-       RETVAL=$?
-       test $RETVAL = 0 && echo_success || echo_failure
-        echo
-        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/xenconsoled
-}
-
-rcstatus() {
-        status xenconsoled
-        RETVAL=$?
-       test $RETVAL = 0 && echo_success || echo_failure
-       echo
-}
-
-reload() {
-       echo -n $"Reloading xenconsoled daemon: "
-       killproc xenconsoled -HUP > /dev/null
-       RETVAL=$?
-       test $RETVAL = 0 && echo_success || echo_failure
-        echo
-}
-
-RETVAL=0
-case "$1" in
-  start)
-        start
-       ;;
-  stop)
-        stop
-       ;;
-  status)
-        rcstatus
-       ;;
-  reload)
-       reload
-        ;;
-  restart|force-reload)
-       stop
-        start
-       ;;
-  condrestart)
-        if [ -f /var/lock/subsys/xenconsoled ]
-        then
-                stop
-                start
-        fi
-        ;;
-  *)
-       echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
-       exit 1
-esac
-
-exit $RETVAL
-
diff --git a/SOURCES/init.xenstored b/SOURCES/init.xenstored
deleted file mode 100755 (executable)
index 328870d..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/bash
-#
-# xenstored    Script to start and stop the Xen control daemon.
-#
-# Author:       Daniel Berrange <berrange@redhat.com
-#
-# chkconfig: 2345 96 01
-# description: Starts and stops the Xen xenstored daemon.
-### BEGIN INIT INFO
-# Provides:          xenstored
-# Required-Start:    $syslog $remote_fs
-# Should-Start:
-# Required-Stop:     $syslog $remote_fs
-# Should-Stop:
-# Default-Start:     3 4 5
-# Default-Stop:      0 1 2 6
-# Default-Enabled:   yes
-# Short-Description: Start/stop xenstored
-# Description:       Starts and stops the Xen xenstored daemon.
-### END INIT INFO
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-if [ ! -d /proc/xen ]; then
-       exit 0
-fi
-if [ ! -f /proc/xen/capabilities ]; then
-       mount -t xenfs xen /proc/xen
-fi
-if ! grep -q "control_d" /proc/xen/capabilities ; then
-       exit 0
-fi
-
-# Default config params
-XENSTORED_PID="/var/run/xenstored.pid"
-XENSTORED_ARGS=
-
-# User customized params
-test -f /etc/sysconfig/xenstored && . /etc/sysconfig/xenstored
-
-start() {
-       echo -n $"Starting xenstored daemon: "
-       grep -q '/var/lib/xenstored' /proc/mounts
-       if test "$?" = "1"; then
-               mount -t tmpfs xenstore /var/lib/xenstored
-               restorecon -R /var/lib/xenstored
-       fi
-        /usr/sbin/xenstored --pid-file $XENSTORED_PID $XENSTORED_ARGS
-       RETVAL=$?
-       test $RETVAL = 0 && echo_success || echo_failure
-        echo
-        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xenstored
-}
-
-stop() {
-       echo -n $"Stopping xenstored daemon: "
-       # xenstored is not restartable.  So we refuse to stop it
-       # unless the machine is being shutdown or rebooted anyway.
-       if test "$runlevel" = "0" -o "$runlevel" = "6"; then
-               killproc xenstored > /dev/null
-               RETVAL=$?
-       else
-               RETVAL=1
-       fi
-       test $RETVAL = 0 && echo_success || echo_failure
-        echo
-        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/xenstored
-}
-
-rcstatus() {
-        status xenstored
-        RETVAL=$?
-       test $RETVAL = 0 && echo_success || echo_failure
-       echo
-}
-
-RETVAL=0
-case "$1" in
-  start)
-        start
-       ;;
-  stop)
-        stop
-       ;;
-  status)
-        rcstatus
-       ;;
-  *)
-       echo $"Usage: $0 {start|stop|status}"
-       exit 1
-esac
-
-exit $RETVAL
-
diff --git a/SOURCES/sysconfig.xenconsoled b/SOURCES/sysconfig.xenconsoled
deleted file mode 100755 (executable)
index 4a00056..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# init.d only settings
-# Log all hypervisor messages (cf xm dmesg)
-#XENCONSOLED_LOG_HYPERVISOR=no
-# Log all guest console output (cf xm console)
-#XENCONSOLED_LOG_GUESTS=no
-
-# systemd only settings
-# No logging (default)
-#XENCONSOLED_LOG=none
-# Log guest console output only
-#XENCONSOLED_LOG=guest
-# Log hypervisor messages only
-#XENCONSOLED_LOG=hv
-# Log both guest console output and hypervisor messages
-#XENCONSOLED_LOG=all
-
-# setting for both init.d and systemd
-# Location to store guest & hypervisor logs
-#XENCONSOLED_LOG_DIR=/var/log/xen/console
-
-#XENCONSOLED_ARGS=
-
diff --git a/SOURCES/sysconfig.xenstored b/SOURCES/sysconfig.xenstored
deleted file mode 100755 (executable)
index 0583132..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-
-#XENSTORED_PID="/var/run/xenstored.pid"
-#XENSTORED_ARGS=
-
index f007c71958a83b21c58a14336e8d69fcef525e55..f6c666837d88ad20823d39a422a3563435e340c0 100644 (file)
@@ -34,12 +34,8 @@ Source13: pciutils-2.2.9.tar.bz2
 Source14: grub-0.97.tar.gz
 Source15: polarssl-1.1.4-gpl.tgz
 # init.d bits
-Source20: init.xenstored
-Source21: init.xenconsoled
 Source23: init.xend
 # sysconfig bits
-Source30: sysconfig.xenstored
-Source31: sysconfig.xenconsoled
 Source33: sysconfig.xend
 # systemd bits
 Source40: proc-xen.mount
@@ -351,8 +347,6 @@ install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
 #mv %{buildroot}%{_sysconfdir}/init.d/* %{buildroot}%{_sysconfdir}/rc.d/init.d
 #rmdir %{buildroot}%{_sysconfdir}/init.d
 %if %with_sysv
-install -m 755 %{SOURCE20} %{buildroot}%{_sysconfdir}/rc.d/init.d/xenstored
-install -m 755 %{SOURCE21} %{buildroot}%{_sysconfdir}/rc.d/init.d/xenconsoled
 install -m 755 %{SOURCE23} %{buildroot}%{_sysconfdir}/rc.d/init.d/xend
 %else
 rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xen-watchdog
@@ -363,8 +357,6 @@ rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xendomains
 
 # sysconfig
 mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
-install -m 644 %{SOURCE30} %{buildroot}%{_sysconfdir}/sysconfig/xenstored
-install -m 644 %{SOURCE31} %{buildroot}%{_sysconfdir}/sysconfig/xenconsoled
 
 # systemd
 %if %with_systemd
@@ -457,8 +449,6 @@ fi
 
 %post runtime
 %if %with_sysv
-/sbin/chkconfig --add xenconsoled
-/sbin/chkconfig --add xenstored
 /sbin/chkconfig --add xencommons
 %endif
 %if %with_systemd
@@ -469,15 +459,13 @@ fi
 
 %if %with_sysv
 if [ $1 != 0 ]; then
-  service xenconsoled condrestart
+  service xencommons restart
 fi
 %endif
 
 %preun runtime
 if [ $1 = 0 ]; then
 %if %with_sysv
-  /sbin/chkconfig --del xenconsoled
-  /sbin/chkconfig --del xenstored
   /sbin/chkconfig --del xencommons
 %endif
 %if %with_systemd
@@ -563,8 +551,6 @@ rm -rf %{buildroot}
 %config %attr(0700,root,root) %{_sysconfdir}/%{name}/scripts/*
 
 %if %with_sysv
-%{_sysconfdir}/rc.d/init.d/xenstored
-%{_sysconfdir}/rc.d/init.d/xenconsoled
 %{_sysconfdir}/rc.d/init.d/xen-watchdog
 %{_sysconfdir}/rc.d/init.d/xencommons
 %endif
@@ -579,8 +565,6 @@ rm -rf %{buildroot}
 /usr/lib/tmpfiles.d/xen.conf
 %endif
 
-%config(noreplace) %{_sysconfdir}/sysconfig/xenstored
-%config(noreplace) %{_sysconfdir}/sysconfig/xenconsoled
 %config(noreplace) %{_sysconfdir}/sysconfig/xencommons
 %config(noreplace) %{_sysconfdir}/xen/xl.conf
 %config(noreplace) %{_sysconfdir}/xen/cpupool
@@ -761,6 +745,7 @@ rm -rf %{buildroot}
  - Backported XSAs 107,109-114
  - Backported fixes to migration, cpupools
  - Remove blktapctl initscripts as it\'s no longer available in 4.4
+ - Removed custom xenconsoled and xenstored initscripts in favor of xencommons
 
 * Wed Oct 22 2014 George Dunlap <george.dunlap@eu.citrix.com> - 4.4.1-2.el6.centos
  - Updated to blktap 2.5 v0.9.2