]> git.sur5r.net Git - bacula/bacula/commitdiff
configure support for Gentoo
authorKern Sibbald <kern@sibbald.com>
Wed, 22 Jan 2003 13:26:54 +0000 (13:26 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 22 Jan 2003 13:26:54 +0000 (13:26 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@311 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/configure.in
bacula/configure
bacula/platforms/Makefile.in
bacula/platforms/gentoo/Makefile.in [new file with mode: 0644]
bacula/platforms/gentoo/bacula-dir.in [new file with mode: 0755]
bacula/platforms/gentoo/bacula-fd.in [new file with mode: 0755]
bacula/platforms/gentoo/bacula-sd.in [new file with mode: 0755]

index deb101adde6081d137d5cedf0700e700f0e012c8..951a7c7c7ad5022e5e84b7d32e731dbd23c34399 100644 (file)
@@ -1233,6 +1233,18 @@ redhat)
            platforms/redhat/bacula-dir"
        hostname=`hostname -s`
   ;;
+gentoo)
+       DISTVER=`uname -r`
+       TAPEDRIVE="/dev/nst0"
+       PSCMD="ps -e -o pid,command"
+       PFILES="\
+           platforms/gentoo/Makefile \
+           platforms/gentoo/bacula-fd \
+           platforms/gentoo/bacula-sd \
+           platforms/gentoo/bacula-dir"
+       hostname=`hostname -s`
+  ;;
+
 slackware)
        DISTVER=`cat /etc/slackware-version`
        TAPEDRIVE="/dev/nst0"
index 5b2d2c2b9bcaf4bf1bb5a8b83ad991c4b7a17640..6e472ca1f1829c851fda0c1247a072d1e21c7753 100755 (executable)
@@ -9304,6 +9304,18 @@ redhat)
            platforms/redhat/bacula-dir"
        hostname=`hostname -s`
   ;;
+gentoo)
+       DISTVER=`uname -r`
+       TAPEDRIVE="/dev/nst0"
+       PSCMD="ps -e -o pid,command"
+       PFILES="\
+           platforms/gentoo/Makefile \
+           platforms/gentoo/bacula-fd \
+           platforms/gentoo/bacula-sd \
+           platforms/gentoo/bacula-dir"
+       hostname=`hostname -s`
+  ;;
+
 slackware)
        DISTVER=`cat /etc/slackware-version`
        TAPEDRIVE="/dev/nst0"
index c74ed0d22e18e4e889486ed3204bc6ebf3ba7289..247cffb742e8a348136e494e223571c6d35853f8 100644 (file)
@@ -11,7 +11,7 @@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL = @INSTALL@
 
-SUBDIRS = freebsd redhat solaris unknown openbsd irix
+SUBDIRS = freebsd redhat solaris unknown openbsd irix gentoo
 
 MAKE = make
 
diff --git a/bacula/platforms/gentoo/Makefile.in b/bacula/platforms/gentoo/Makefile.in
new file mode 100644 (file)
index 0000000..045ffd1
--- /dev/null
@@ -0,0 +1,81 @@
+# 
+# This file is used as the template to create the
+# Makefile for the Gentoo specific installation.
+#
+#  22 January 2003 -- Kern Sibbald
+#
+#  for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+
+nothing:
+
+install: install-autostart
+
+install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
+
+       
+install-autostart-fd:
+       @rm -f /etc/rc0.d/K20bacula-fd
+       @rm -f /etc/rc1.d/S99bacula-fd
+       @rm -f /etc/rc2.d/S99bacula-fd
+       @$(INSTALL_PROGRAM) -m 744 bacula-fd /etc/init.d/bacula-fd
+       # set symlinks for script at startup and shutdown
+       @ln -f -s /etc/init.d/bacula-fd /etc/rc0.d/K20bacula-fd
+       @ln -f -s /etc/init.d/bacula-fd /etc/rc1.d/S99bacula-fd
+       @ln -f -s /etc/init.d/bacula-fd /etc/rc2.d/S99bacula-fd
+
+
+install-autostart-sd:
+       @rm -f /etc/rc0.d/K20bacula-sd
+       @rm -f /etc/rc1.d/S99bacula-sd
+       @rm -f /etc/rc2.d/S99bacula-sd
+       @$(INSTALL_PROGRAM) -m 744 bacula-sd /etc/rc.d/init.d/bacula-sd
+       # set symlinks for script at startup and shutdown
+       @ln -f -s /etc/init.d/bacula-sd /etc/rc0.d/K20bacula-sd
+       @ln -f -s /etc/init.d/bacula-sd /etc/rc1.d/S99bacula-sd
+       @ln -f -s /etc/init.d/bacula-sd /etc/rc2.d/S99bacula-sd
+
+
+install-autostart-dir:
+       @rm -f /etc/rc0.d/K20bacula-dir
+       @rm -f /etc/rc1.d/S99bacula-dir
+       @rm -f /etc/rc2.d/S99bacula-dir
+       @$(INSTALL_PROGRAM) -m 744 bacula-dir /etc/rc.d/init.d/bacula-dir
+       # set symlinks for script at startup and shutdown
+       @ln -f -s /etc/init.d/bacula-dir /etc/rc0.d/K20bacula-dir
+       @ln -f -s /etc/init.d/bacula-dir /etc/rc1.d/S99bacula-dir
+       @ln -f -s /etc/init.d/bacula-dir /etc/rc2.d/S99bacula-dir
+
+
+uninstall: uninstall-autostart
+
+uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
+
+uninstall-autostart-fd:
+       @rm -f /etc/rc0.d/K20bacula-fd
+       @rm -f /etc/rc1.d/S99bacula-fd
+       @rm -f /etc/rc2.d/S99bacula-fd
+       @rm -f /etc/rc.d/init.d/bacula-fd
+
+
+uninstall-autostart-sd:
+       @rm -f /etc/rc0.d/K20bacula-sd
+       @rm -f /etc/rc1.d/S99bacula-sd
+       @rm -f /etc/rc2.d/S99bacula-sd
+       @rm -f /etc/rc.d/init.d/bacula-sd
+
+uninstall-autostart-dir:
+       @rm -f /etc/rc0.d/K20bacula-dir
+       @rm -f /etc/rc1.d/S99bacula-dir
+       @rm -f /etc/rc2.d/S99bacula-dir
+       @rm -f /etc/rc.d/init.d/bacula-dir
+
+clean:
+       @rm -f bacula-sd bacula-fd bacula-dir
+
+distclean: clean
+       @rm -f Makefile bacula-*.spec
+       @rm -rf CVS
diff --git a/bacula/platforms/gentoo/bacula-dir.in b/bacula/platforms/gentoo/bacula-dir.in
new file mode 100755 (executable)
index 0000000..d568cdb
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh
+#
+# bacula       This shell script takes care of starting and stopping
+#             the bacula Director daemon
+#
+# chkconfig: 2345 20 99
+# description: It comes by night and sucks the vital essence from your computers.
+#
+#  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+case "$1" in
+    start)
+       echo -n "Starting the Bacula Director: "
+       daemon @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
+       ;;
+    stop)
+       echo -n "Stopping the Director daemon: "
+       killproc @sbindir@/bacula-dir
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-dir
+       ;;
+    restart)
+       $0 stop
+       sleep 5
+       $0 start
+       ;;
+    status)
+       status @sbindir@/bacula-dir
+       ;;
+    *)
+       echo "Usage: $0 {start|stop|restart|status}"
+       exit 1
+       ;;
+esac
+exit 0
diff --git a/bacula/platforms/gentoo/bacula-fd.in b/bacula/platforms/gentoo/bacula-fd.in
new file mode 100755 (executable)
index 0000000..19f04f0
--- /dev/null
@@ -0,0 +1,43 @@
+#! /bin/sh
+#
+# bacula       This shell script takes care of starting and stopping
+#             the bacula File daemon.
+#
+# chkconfig: 2345 20 99
+# description: It comes by night and sucks the vital essence from your computers.
+#
+#  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+case "$1" in
+    start)
+       echo -n "Starting the Bacula File daemon: "
+       daemon @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
+       ;;
+    stop)
+       echo -n "Stopping the Bacula File daemon: "
+       killproc @sbindir@/bacula-fd
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd
+       ;;
+    restart)
+       $0 stop
+       sleep 5
+       $0 start
+       ;;
+    status)
+       status @sbindir@/bacula-fd
+       ;;
+    *)
+       echo "Usage: $0 {start|stop|restart|status}"
+       exit 1
+       ;;
+esac
+exit 0
diff --git a/bacula/platforms/gentoo/bacula-sd.in b/bacula/platforms/gentoo/bacula-sd.in
new file mode 100755 (executable)
index 0000000..a4bfdd4
--- /dev/null
@@ -0,0 +1,43 @@
+#! /bin/sh
+#
+# bacula       This shell script takes care of starting and stopping
+#             the bacula Storage daemon.
+#
+# chkconfig: 2345 20 99
+# description: It comes by night and sucks the vital essence from your computers.
+#
+#  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+case "$1" in
+    start)
+       echo -n "Starting the Bacula Storage daemon: "
+       daemon @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-sd
+       ;;
+    stop)
+       echo -n "Stopping the Bacula Storage daemon: "
+       killproc @sbindir@/bacula-sd
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-sd
+       ;;
+    restart)
+       $0 stop
+       sleep 5
+       $0 start
+       ;;
+    status)
+       status @sbindir@/bacula-sd
+       ;;
+    *)
+       echo "Usage: $0 {start|stop|restart|status}"
+       exit 1
+       ;;
+esac
+exit 0