From 969c3166c876b2a9cdcf30fec8a2921633d372da Mon Sep 17 00:00:00 2001 From: Sven Hoexter Date: Wed, 26 Oct 2011 17:21:38 +0200 Subject: [PATCH] Remove dependency on redhat-lsb. - Removed redhat-lsb from the requires line in the spec file. - Replaced all log_* lsb functions with echo '' && (warning|success|failure). --- mpt-status.init | 15 +++++++-------- mpt-status.spec | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/mpt-status.init b/mpt-status.init index af69e06..b5fa7ca 100644 --- a/mpt-status.init +++ b/mpt-status.init @@ -41,10 +41,9 @@ test -x /usr/sbin/mpt-status || exit 0 # Source function library. . /etc/rc.d/init.d/functions -. /lib/lsb/init-functions if [ $RUN_DAEMON = "no" ] ; then - log_failure_msg $"mpt-statusd is disabled in /etc/default/mpt-statusd, not starting." + echo "mpt-statusd is disabled in /etc/default/mpt-statusd, not starting." && failure exit 0 fi @@ -53,7 +52,7 @@ fi modprobe mptctl || true if ! [ -e "/proc/mpt/version" ] ; then - log_failure_msg "The mptctl module is missing." + echo "The mptctl module is missing." && failure exit 0 fi @@ -137,7 +136,7 @@ check_daemon() { d_start() { [ -f $PIDFILE ] && PID="`cat $PIDFILE`" if [ "$PID" ] ; then - log_warning_msg "Daemon already running. Refusing to start another" + echo "Daemon already running. Refusing to start another" && warning return 0 elif check_daemon ; then # Use daemonize to turn it into a daemon and start it with daemon(). @@ -146,7 +145,7 @@ d_start() { [ $RETVAL -eq 0 ] && touch $LOCKFILE return $RETVAL else - log_warning_msg "Daemon is already running. Refusing to start another" + echo "Daemon is already running. Refusing to start another" && warning return 0 fi } @@ -163,11 +162,11 @@ d_stop() { rm -f $PIDFILE $LOCKFILE return 0 else - log_failure_msg "$NAME failed to stop" + echo "$NAME failed to stop" && failure return 1 fi else - log_warning_msg "$NAME is already stopped." + echo "$NAME is already stopped." && warning return 0 fi } @@ -179,7 +178,7 @@ d_stop_by_restart() { killproc -p $PIDFILE $SCRIPTNAME > /dev/null 2>&1 rm -f $PIDFILE $LOCKFILE else - log_warning_msg "Daemon is already stopped." + echo "Daemon is already stopped." && warning fi } diff --git a/mpt-status.spec b/mpt-status.spec index 6b6c560..96ef26c 100644 --- a/mpt-status.spec +++ b/mpt-status.spec @@ -10,7 +10,7 @@ Source10: mpt-status.init Patch1: mpt-status.header_path.patch Patch2: mpt-status.includes.patch BuildRequires: pciutils-devel -Requires: redhat-lsb, daemonize +Requires: daemonize Requires (preun): /sbin/chkconfig Requires (preun): /sbin/service Requires (post): /sbin/chkconfig -- 2.39.2