[bacula/f17: 1/2] SysV init scripts cleanup

Simone Caronni slaanesh at fedoraproject.org
Tue Jun 19 09:55:48 UTC 2012


commit 70dfbe28453bca47c75928ecb33453b766f64652
Author: Simone Caronni <negativo17 at gmail.com>
Date:   Tue Jun 19 11:55:17 2012 +0200

    SysV init scripts cleanup

 bacula-dir.init |   39 ---------------------------------------
 bacula-sd.init  |   39 ---------------------------------------
 2 files changed, 0 insertions(+), 78 deletions(-)
---
diff --git a/bacula-dir.init b/bacula-dir.init
index 02376ac..a4be040 100644
--- a/bacula-dir.init
+++ b/bacula-dir.init
@@ -33,50 +33,11 @@ if [ "$DIR_GROUP" != '' ]; then
 	OPTS="$OPTS -g $DIR_GROUP"
 fi
 
-checkdatabase() {
-	# First, get the currently selected database backend from the
-	# alternatives system.
-	DB=$(LANG=C alternatives --display bacula-dir | grep 'link currently points to' | awk -F. '{ print $2 }')
-	case "$DB" in
-		sqlite)
-			# No check needed to see if the Database is running
-			;;
-		mysql)
-			# Check if mysqld is running
-			service mysqld status > /dev/null 2>&1
-			if [ $? -ne 0 ]; then
-				echo -n "Error: MySQL is not running"
-				echo_failure
-				echo
-				exit 1
-			fi
-			;;
-		postgresql)
-			# Check if postgresql is running
-			service postgresql status > /dev/null 2>&1
-			if [ $? -ne 0 ]; then
-				echo -n "Error: PostgreSQL is not running"
-				echo_failure
-				echo
-				exit 1
-			fi
-			;;
-		*)
-			echo -n "Error: Unknown database backend"
-			echo_failure
-			echo
-			exit 1
-			;;
-	esac
-}
-
 start() {
 	[ "$EUID" != "0" ] && exit 4
 
 	echo -n "Starting $prog: "
 	bacula-checkconf $CONFIG
-#	Removed for now, as the db might not be on localhost
-#	checkdatabase
 	daemon $prog $OPTS
 	RETVAL=$?
 	echo
diff --git a/bacula-sd.init b/bacula-sd.init
index 6fb5e8d..46aec10 100644
--- a/bacula-sd.init
+++ b/bacula-sd.init
@@ -32,50 +32,11 @@ if [ "$SD_GROUP" != '' ]; then
 	OPTS="$OPTS -g $SD_GROUP"
 fi
 
-checkdatabase() {
-	# First, get the currently selected database backend from the
-	# alternatives system.
-	DB=$(LANG=C alternatives --display bacula-sd | grep 'link currently points to' | awk -F. '{ print $2 }')
-	case "$DB" in
-		sqlite)
-			# No check needed to see if the Database is running
-			;;
-		mysql)
-			# Check if mysqld is running
-			service mysqld status > /dev/null 2>&1
-			if [ $? -ne 0 ]; then
-				echo -n "Error: MySQL is not running"
-				echo_failure
-				echo
-				exit 1
-			fi
-			;;
-		postgresql)
-			# Check if postgresql is running
-			service postgresql status > /dev/null 2>&1
-			if [ $? -ne 0 ]; then
-				echo -n "Error: PostgreSQL is not running"
-				echo_failure
-				echo
-				exit 1
-			fi
-			;;
-		*)
-			echo -n "Error: Unknown database backend"
-			echo_failure
-			echo
-			exit 1
-			;;
-	esac
-}
-
 start() {
 	[ "$EUID" != "0" ] && exit 4
 
 	echo -n "Starting $prog: "
 	bacula-checkconf $CONFIG
-# Disabled, the DB does not necessarily run on the same machine
-#	checkdatabase
 	daemon $prog $OPTS
 	RETVAL=$?
 	echo


More information about the scm-commits mailing list