[Box Backup] BoxBackup 0,08 SUSE Linux packages

Martin Ebourne boxbackup@fluffy.co.uk
Fri, 24 Sep 2004 13:37:08 +0100


--=-cBEOfq3ONFiChLQID5i+
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Fri, 2004-09-24 at 03:23, Chris Smith wrote:
> I've spent this morning and a few hours yesterday altering Martin's 
> .spec file and creating specific init scripts for SUSE Linux. These 
> RPM's were built and compiled on SUSE Linux 9.0 but included is the spec 
> file and custom init scripts which should work from SUSE 8.0 to SUSE 
> 9.1, you just need to build them yourself!

Cool. I've incorporated all of your changes back into the stuff I had
and made the rpm spec automatically work out what distro it is building
on and behave accordingly. The Grand Unified RPM Patch is included. ;)

> Martin: Inside your .spec you reference a variable "%{backup_dir}" which 
> wasn't set causing the adduser command to fail (quietly, but user isn't 
> added). What is that variable supposed to be?

Ah, yes, some late cleanup broke that. Doh! I've changed it to
/var/empty. If SUSE doesn't have that can you pick something suitable.

If you could apply this patch and check that the SUSE RPM all still
works correctly then Ben can apply this as is. One question though, from
my reading of http://www.suse.de/~mmj/Package-Conventions/ it would
appear that there should be some calls to insserv, and that the
rcbbackupd etc scripts need to be symlinked by the package. Is this
correct or is that out of date?

Ben, I've moved the bbstored and bbackupd startup scripts from
contrib/rpm to contrib/redhat and added Chris's in contrib/suse. The
patch is with -Nru so it will do that automatically or you can
repository move if you prefer. (Can highly recommend Subversion to solve
those sorts of problems. ;))

Updated RPMs for FC:

http://www.ebourne.me.uk/rpms/boxbackup-0.08-2.src.rpm
http://www.ebourne.me.uk/rpms/boxbackup-client-0.08-2.i386.rpm
http://www.ebourne.me.uk/rpms/boxbackup-server-0.08-2.i386.rpm
http://www.ebourne.me.uk/rpms/boxbackup-client-0.08-2.x86_64.rpm
http://www.ebourne.me.uk/rpms/boxbackup-server-0.08-2.x86_64.rpm

Cheers,

Martin.

--=-cBEOfq3ONFiChLQID5i+
Content-Disposition: attachment; filename=gurp.patch
Content-Type: text/x-patch; name=gurp.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

diff -urN boxbackup-0.08.orig/contrib/redhat/bbackupd boxbackup-0.08/contrib/redhat/bbackupd
--- boxbackup-0.08.orig/contrib/redhat/bbackupd	1970-01-01 01:00:00.000000000 +0100
+++ boxbackup-0.08/contrib/redhat/bbackupd	2004-09-23 10:56:11.000000000 +0100
@@ -0,0 +1,83 @@
+#! /bin/bash
+#
+# bbackupd          Start/Stop the box backup daemon.
+#
+# chkconfig: 345 93 07
+# description: bbackup is the client side deamon for Box Backup, a completely \
+#              automatic on-line backup system
+# processname: bbackupd
+# config: /etc/box
+# pidfile: /var/run/bbackupd.pid
+
+# Source function library.
+. /etc/init.d/functions
+
+RETVAL=0
+
+# See how we were called.
+
+prog="bbackupd"
+
+# Check that configuration exists.
+[ -f /etc/box/$prog.conf ] || exit 0
+
+start() {
+	echo -n $"Starting $prog: "
+	daemon $prog
+	RETVAL=$?
+	echo
+	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+	return $RETVAL
+}
+
+stop() {
+	echo -n $"Stopping $prog: "
+	killproc $prog
+	RETVAL=$?
+	echo
+	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
+	return $RETVAL
+}
+
+rhstatus() {
+	status $prog
+}
+
+restart() {
+  	stop
+	start
+}
+
+reload() {
+        echo -n $"Reloading $prog daemon configuration: "
+        killproc $prog -HUP
+        retval=$?
+        echo
+        return $RETVAL
+}
+
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
+	;;
+  restart)
+  	restart
+	;;
+  reload)
+        reload
+        ;;
+  status)
+  	rhstatus
+	;;
+  condrestart)
+  	[ -f /var/lock/subsys/$prog ] && restart || :
+	;;
+  *)
+	echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
+	exit 1
+esac
+
+exit $?
diff -urN boxbackup-0.08.orig/contrib/redhat/bbstored boxbackup-0.08/contrib/redhat/bbstored
--- boxbackup-0.08.orig/contrib/redhat/bbstored	1970-01-01 01:00:00.000000000 +0100
+++ boxbackup-0.08/contrib/redhat/bbstored	2004-09-23 10:56:11.000000000 +0100
@@ -0,0 +1,83 @@
+#! /bin/bash
+#
+# bbstored          Start/Stop the box backup daemon.
+#
+# chkconfig: 345 93 07
+# description: bbstore is the server side deamon for Box Backup, a completely \
+#              automatic on-line backup system
+# processname: bbstored
+# config: /etc/box
+# pidfile: /var/run/bbstored.pid
+
+# Source function library.
+. /etc/init.d/functions
+
+RETVAL=0
+
+# See how we were called.
+
+prog="bbstored"
+
+# Check that configuration exists.
+[ -f /etc/box/$prog.conf ] || exit 0
+
+start() {
+	echo -n $"Starting $prog: "
+	daemon $prog
+	RETVAL=$?
+	echo
+	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+	return $RETVAL
+}
+
+stop() {
+	echo -n $"Stopping $prog: "
+	killproc $prog
+	RETVAL=$?
+	echo
+	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
+	return $RETVAL
+}
+
+rhstatus() {
+	status $prog
+}
+
+restart() {
+  	stop
+	start
+}
+
+reload() {
+        echo -n $"Reloading $prog daemon configuration: "
+        killproc $prog -HUP
+        retval=$?
+        echo
+        return $RETVAL
+}
+
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
+	;;
+  restart)
+  	restart
+	;;
+  reload)
+        reload
+        ;;
+  status)
+  	rhstatus
+	;;
+  condrestart)
+  	[ -f /var/lock/subsys/$prog ] && restart || :
+	;;
+  *)
+	echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
+	exit 1
+esac
+
+exit $?
diff -urN boxbackup-0.08.orig/contrib/redhat/README.txt boxbackup-0.08/contrib/redhat/README.txt
--- boxbackup-0.08.orig/contrib/redhat/README.txt	1970-01-01 01:00:00.000000000 +0100
+++ boxbackup-0.08/contrib/redhat/README.txt	2004-09-24 12:29:11.941983429 +0100
@@ -0,0 +1,7 @@
+These start scripts are for Fedora Core or RedHat Enterprise Linux. If
+installed manually they should be placed in /etc/rc.d/init.d.
+
+They may also work for Mandrake.
+
+Martin Ebourne
+martin@zepler.org
diff -urN boxbackup-0.08.orig/contrib/rpm/bbackupd boxbackup-0.08/contrib/rpm/bbackupd
--- boxbackup-0.08.orig/contrib/rpm/bbackupd	2004-09-23 10:56:11.000000000 +0100
+++ boxbackup-0.08/contrib/rpm/bbackupd	1970-01-01 01:00:00.000000000 +0100
@@ -1,83 +0,0 @@
-#! /bin/bash
-#
-# bbackupd          Start/Stop the box backup daemon.
-#
-# chkconfig: 345 93 07
-# description: bbackup is the client side deamon for Box Backup, a completely \
-#              automatic on-line backup system
-# processname: bbackupd
-# config: /etc/box
-# pidfile: /var/run/bbackupd.pid
-
-# Source function library.
-. /etc/init.d/functions
-
-RETVAL=0
-
-# See how we were called.
-
-prog="bbackupd"
-
-# Check that configuration exists.
-[ -f /etc/box/$prog.conf ] || exit 0
-
-start() {
-	echo -n $"Starting $prog: "
-	daemon $prog
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
-	return $RETVAL
-}
-
-stop() {
-	echo -n $"Stopping $prog: "
-	killproc $prog
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
-	return $RETVAL
-}
-
-rhstatus() {
-	status $prog
-}
-
-restart() {
-  	stop
-	start
-}
-
-reload() {
-        echo -n $"Reloading $prog daemon configuration: "
-        killproc $prog -HUP
-        retval=$?
-        echo
-        return $RETVAL
-}
-
-case "$1" in
-  start)
-  	start
-	;;
-  stop)
-  	stop
-	;;
-  restart)
-  	restart
-	;;
-  reload)
-        reload
-        ;;
-  status)
-  	rhstatus
-	;;
-  condrestart)
-  	[ -f /var/lock/subsys/$prog ] && restart || :
-	;;
-  *)
-	echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
-	exit 1
-esac
-
-exit $?
diff -urN boxbackup-0.08.orig/contrib/rpm/bbstored boxbackup-0.08/contrib/rpm/bbstored
--- boxbackup-0.08.orig/contrib/rpm/bbstored	2004-09-23 10:56:11.000000000 +0100
+++ boxbackup-0.08/contrib/rpm/bbstored	1970-01-01 01:00:00.000000000 +0100
@@ -1,83 +0,0 @@
-#! /bin/bash
-#
-# bbstored          Start/Stop the box backup daemon.
-#
-# chkconfig: 345 93 07
-# description: bbstore is the server side deamon for Box Backup, a completely \
-#              automatic on-line backup system
-# processname: bbstored
-# config: /etc/box
-# pidfile: /var/run/bbstored.pid
-
-# Source function library.
-. /etc/init.d/functions
-
-RETVAL=0
-
-# See how we were called.
-
-prog="bbstored"
-
-# Check that configuration exists.
-[ -f /etc/box/$prog.conf ] || exit 0
-
-start() {
-	echo -n $"Starting $prog: "
-	daemon $prog
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
-	return $RETVAL
-}
-
-stop() {
-	echo -n $"Stopping $prog: "
-	killproc $prog
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
-	return $RETVAL
-}
-
-rhstatus() {
-	status $prog
-}
-
-restart() {
-  	stop
-	start
-}
-
-reload() {
-        echo -n $"Reloading $prog daemon configuration: "
-        killproc $prog -HUP
-        retval=$?
-        echo
-        return $RETVAL
-}
-
-case "$1" in
-  start)
-  	start
-	;;
-  stop)
-  	stop
-	;;
-  restart)
-  	restart
-	;;
-  reload)
-        reload
-        ;;
-  status)
-  	rhstatus
-	;;
-  condrestart)
-  	[ -f /var/lock/subsys/$prog ] && restart || :
-	;;
-  *)
-	echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
-	exit 1
-esac
-
-exit $?
diff -urN boxbackup-0.08.orig/contrib/rpm/boxbackup.spec boxbackup-0.08/contrib/rpm/boxbackup.spec
--- boxbackup-0.08.orig/contrib/rpm/boxbackup.spec	2004-09-23 10:56:11.000000000 +0100
+++ boxbackup-0.08/contrib/rpm/boxbackup.spec	2004-09-24 13:09:14.194472302 +0100
@@ -1,12 +1,31 @@
 %define bb_user_id 171
 %define ident %{name}-%{version}
 
+# Detect distribution. So far we only special-case SUSE. If you need to make
+# any distro specific changes to get the package building on your system
+# please email them to martin@zepler.org
+#%define is_fc   %(test -e %{_sysconfdir}/fedora-release && echo 1 || echo 0)
+#%define is_mdk  %(test -e %{_sysconfdir}/mandrake-release && echo 1 || echo 0)
+#%define is_rh   %(test -e %{_sysconfdir}/redhat-release && echo 1 || echo 0)
+%define is_suse %(test -e %{_sysconfdir}/SuSE-release && echo 1 || echo 0)
+
+%if %{is_suse}
+%define init_dir %{_sysconfdir}/init.d
+%define dist suse
+%define rc_start rc
+%else
+%define init_dir %{_sysconfdir}/rc.d/init.d
+%define dist redhat
+%define rc_start "service "
+%endif
+
 Summary: An automatic on-line backup system for UNIX.
 Name: boxbackup
 Version: 0.08
-Release: 1
+Release: 2
 License: BSD
 Group: Applications/Archiving
+Packager: Martin Ebourne <martin@zepler.org>
 URL: http://www.fluffy.co.uk/boxbackup/
 Source0: %{ident}.tgz
 Requires: openssl >= 0.9.7a
@@ -62,7 +81,7 @@
 
 mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{ident}
 mkdir -p $RPM_BUILD_ROOT%{_bindir}
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
+mkdir -p $RPM_BUILD_ROOT%{init_dir}
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/box/bbackupd
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/box/bbstored
 mkdir -p $RPM_BUILD_ROOT%{_var}/lib/box
@@ -79,7 +98,7 @@
 
 # Client
 touch $RPM_BUILD_ROOT%{_sysconfdir}/box/bbackupd.conf
-install contrib/rpm/bbackupd $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
+install -m 755 contrib/%{dist}/bbackupd $RPM_BUILD_ROOT%{init_dir}
 %define client_dir parcels/%{ident}-backup-client-Linux
 install %{client_dir}/bbackupd $RPM_BUILD_ROOT%{_bindir}
 install %{client_dir}/bbackupquery $RPM_BUILD_ROOT%{_bindir}
@@ -89,7 +108,7 @@
 # Server
 touch $RPM_BUILD_ROOT%{_sysconfdir}/box/bbstored.conf
 touch $RPM_BUILD_ROOT%{_sysconfdir}/box/raidfile.conf
-install contrib/rpm/bbstored $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
+install -m 755 contrib/%{dist}/bbstored $RPM_BUILD_ROOT%{init_dir}
 %define server_dir parcels/%{ident}-backup-server-Linux
 install %{server_dir}/bbstored $RPM_BUILD_ROOT%{_bindir}
 install %{server_dir}/bbstoreaccounts $RPM_BUILD_ROOT%{_bindir}
@@ -99,36 +118,37 @@
 
 %pre server
 /usr/sbin/useradd -c "Box Backup" -u %{bb_user_id} \
-	-s /sbin/nologin -r -d %{backup_dir} box 2> /dev/null || :
+	-s /sbin/nologin -r -d %{_var}/empty box 2> /dev/null || :
 
 %post client
 /sbin/chkconfig --add bbackupd
 if [ ! -f %{_sysconfdir}/box/bbackupd.conf ]; then
 	echo "You should run the following to configure the client:"
-	echo "bbackupd-config /etc/box lazy <account-number> <server-host> /var/lib/box <backup-directories>"
+	echo "bbackupd-config %{_sysconfdir}/box lazy <account-number> <server-host>" \
+	     "%{_var}/lib/box <backup-directories>"
 	echo "Then follow the instructions. Use this to start the client:"
-	echo "service bbackupd start"
+	echo "%{rc_start}bbackupd start"
 fi
 
 %post server
 /sbin/chkconfig --add bbstored
 if [ ! -f %{_sysconfdir}/box/bbstored.conf ]; then
 	echo "You should run the following to configure the server:"
-	echo "raidfile-config /etc/box 2048 <store-directory> [<raid-directories>]"
-	echo "bbstored-config /etc/box" `hostname` box
+	echo "raidfile-config %{_sysconfdir}/box 2048 <store-directory> [<raid-directories>]"
+	echo "bbstored-config %{_sysconfdir}/box" `hostname` box
 	echo "Then follow the instructions. Use this to start the server:"
-	echo "service bbstored start"
+	echo "%{rc_start}bbstored start"
 fi
 
 %preun client
 if [ $1 = 0 ]; then
-	/sbin/service bbackupd stop > /dev/null 2>&1
+	%{init_dir}/bbackupd stop > /dev/null 2>&1
 	/sbin/chkconfig --del bbackupd
 fi
 
 %preun server
 if [ $1 = 0 ]; then
-	/sbin/service bbstored stop > /dev/null 2>&1
+	%{init_dir}/bbstored stop > /dev/null 2>&1
 	/sbin/chkconfig --del bbstored
 fi
 
@@ -141,7 +161,7 @@
 %dir %attr(700,root,root) %{_sysconfdir}/box/bbackupd
 %dir %attr(755,root,root) %{_var}/lib/box
 %doc %{_docdir}/%{ident}/*.txt
-%config %{_sysconfdir}/rc.d/init.d/bbackupd
+%config %{init_dir}/bbackupd
 %config %ghost %{_sysconfdir}/box/bbackupd.conf
 %{_bindir}/bbackupd
 %{_bindir}/bbackupquery
@@ -151,7 +171,7 @@
 %files server
 %defattr(-,root,root,-)
 %dir %attr(700,box,root) %{_sysconfdir}/box/bbstored
-%config %{_sysconfdir}/rc.d/init.d/bbstored
+%config %{init_dir}/bbstored
 %config %ghost %{_sysconfdir}/box/bbstored.conf
 %config %ghost %{_sysconfdir}/box/raidfile.conf
 %{_bindir}/bbstored
@@ -161,5 +181,9 @@
 %{_bindir}/raidfile-config
 
 %changelog
+* Fri Sep 24 2004 Martin Ebourne <martin@zepler.org> - 0.08-2
+- Added support for other distros
+- Changes for SUSE provided by Chris Smith <chris.smith@nothingbutnet.co.nz>
+
 * Mon Sep 16 2004 Martin Ebourne <martin@zepler.org> - 0.07-1
 - Initial build
diff -urN boxbackup-0.08.orig/contrib/rpm/README.txt boxbackup-0.08/contrib/rpm/README.txt
--- boxbackup-0.08.orig/contrib/rpm/README.txt	2004-09-23 10:56:11.000000000 +0100
+++ boxbackup-0.08/contrib/rpm/README.txt	2004-09-24 12:33:18.187222972 +0100
@@ -6,11 +6,11 @@
 
 where <tarfile> is the archive you downloaded of Box Backup.
 
-This RPM should work on RedHat Enterprise, Fedora Core, Mandrake, and any
-similar distributions. It has been developed and tested on Fedora Core.
+This RPM should work on RedHat Enterprise, Fedora Core, Mandrake, SUSE, and
+any similar distributions. It has been developed and tested on Fedora Core.
 
-SUSE Linux will need edits to the init scripts (bbackupd and bbstored), and
-may need changes to the spec files too. I don't run SUSE so can't be sure.
+Changes for SUSE Linux were provided by Chris Smith
+(chris.smith@nothingbutnet.co.nz).
 
 Martin Ebourne
 martin@zepler.org
diff -urN boxbackup-0.08.orig/contrib/suse/bbackupd boxbackup-0.08/contrib/suse/bbackupd
--- boxbackup-0.08.orig/contrib/suse/bbackupd	1970-01-01 01:00:00.000000000 +0100
+++ boxbackup-0.08/contrib/suse/bbackupd	2004-09-24 02:56:15.000000000 +0100
@@ -0,0 +1,100 @@
+#! /bin/sh
+#
+# Copyright (c)2004, Nothing But Net Limited
+#	<chris.smith@nothingbutnet.co.nz>
+#
+######################################################################
+# RELEASED AND PROVIDED TO YOU UNDER THE SAME LICENCE AS THE BOXBACKUP
+# SUITE OF PROGRAMS. LICENCE MAY BE VIEWED HERE:
+#
+# http://www.fluffy.co.uk/boxbackup/license.html
+######################################################################
+#
+# /etc/init.d/bbackupd
+#   and its symbolic link
+# /(usr/)sbin/rcbbackupd
+#
+### BEGIN INIT INFO
+# Provides:          bbackupd
+# Required-Start:    $named $network $local_fs $syslog
+# X-UnitedLinux-Should-Start: $time ypbind sendmail
+# Required-Stop:     $named $network $localfs $syslog
+# X-UnitedLinux-Should-Stop: $time ypbind sendmail
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: BoxBackup client side daemon
+# Description: Client daemon for the BoxBackup software       
+#	that allows you to communicate with a bbstored server.
+### END INIT INFO
+# 
+
+# Check for missing binaries (stale symlinks should not happen)
+BBACKUPD_BIN=/usr/bin/bbackupd
+test -x $BBACKUPD_BIN || {echo "$BBACKUPD_BIN not installed"; exit 5}
+
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
+
+case "$1" in
+	start)
+	echo -n "Starting bbackupd "
+	startproc $BBACKUPD_BIN
+	rc_status -v
+	;;
+	
+    stop)
+	echo -n "Shutting down bbackupd "
+	killproc -TERM $BBACKUPD_BIN
+	rc_status -v
+	;;
+
+    try-restart|condrestart)
+	if test "$1" = "condrestart"; then
+		echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+	fi
+	$0 status
+	if test $? = 0; then
+		$0 restart
+	else
+		rc_reset	# Not running is not a failure.
+	fi
+	rc_status
+	;;
+	
+    restart)
+	$0 stop
+	$0 start
+	rc_status
+	;;
+
+    force-reload)
+	echo -n "Reload service bbackupd "
+	killproc -HUP $BBACKUPD_BIN
+	rc_status -v
+	;;
+
+    reload)
+	echo -n "Reload service bbackupd  "
+	killproc -HUP $BBACKUPD_BIN
+	rc_status -v
+	;;
+
+    status)
+	echo -n "Checking for service bbackupd "
+	checkproc $BBACKUPD_BIN
+	rc_status -v
+	;;
+
+    probe)
+	test /etc/box/bbackupd.conf -nt /var/run/bbackupd.pid && echo reload
+	;;
+	
+    *)
+	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+	exit 1
+	;;
+
+esac
+rc_exit
diff -urN boxbackup-0.08.orig/contrib/suse/bbstored boxbackup-0.08/contrib/suse/bbstored
--- boxbackup-0.08.orig/contrib/suse/bbstored	1970-01-01 01:00:00.000000000 +0100
+++ boxbackup-0.08/contrib/suse/bbstored	2004-09-24 02:56:15.000000000 +0100
@@ -0,0 +1,100 @@
+#! /bin/sh
+#
+# Copyright (c)2004, Nothing But Net Limited
+#   <chris.smith@nothingbutnet.co.nz>
+#
+######################################################################
+# RELEASED AND PROVIDED TO YOU UNDER THE SAME LICENCE AS THE BOXBACKUP
+# SUITE OF PROGRAMS. LICENCE MAY BE VIEWED HERE:
+#
+# http://www.fluffy.co.uk/boxbackup/license.html
+######################################################################
+#
+# /etc/init.d/bbackupd
+#   and its symbolic link
+# /(usr/)sbin/rcbbackupd
+#
+### BEGIN INIT INFO
+# Provides:          bbackupd
+# Required-Start:    $named $network $local_fs $syslog
+# X-UnitedLinux-Should-Start: $time ypbind sendmail
+# Required-Stop:     $named $network $localfs $syslog
+# X-UnitedLinux-Should-Stop: $time ypbind sendmail
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: BoxBackup server side daemon
+# Description: Client daemon for the BoxBackup software       
+#	that allows you to communicate with a bbstored server.
+### END INIT INFO
+# 
+
+# Check for missing binaries (stale symlinks should not happen)
+BBACKUPD_BIN=/usr/bin/bbstored
+test -x $BBACKUPD_BIN || {echo "$BBACKUPD_BIN not installed"; exit 5}
+
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
+
+case "$1" in
+	start)
+	echo -n "Starting bbstored "
+	startproc $BBACKUPD_BIN
+	rc_status -v
+	;;
+	
+    stop)
+	echo -n "Shutting down bstored "
+	killproc -TERM $BBACKUPD_BIN
+	rc_status -v
+	;;
+
+    try-restart|condrestart)
+	if test "$1" = "condrestart"; then
+		echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+	fi
+	$0 status
+	if test $? = 0; then
+		$0 restart
+	else
+		rc_reset	# Not running is not a failure.
+	fi
+	rc_status
+	;;
+	
+    restart)
+	$0 stop
+	$0 start
+	rc_status
+	;;
+
+    force-reload)
+	echo -n "Reload service bbstored "
+	killproc -HUP $BBACKUPD_BIN
+	rc_status -v
+	;;
+
+    reload)
+	echo -n "Reload service bbstored  "
+	killproc -HUP $BBACKUPD_BIN
+	rc_status -v
+	;;
+
+    status)
+	echo -n "Checking for service bbstored "
+	checkproc $BBACKUPD_BIN
+	rc_status -v
+	;;
+
+    probe)
+	test /etc/box/bbstored.conf -nt /var/run/bbstored.pid && echo reload
+	;;
+	
+    *)
+	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+	exit 1
+	;;
+
+esac
+rc_exit
diff -urN boxbackup-0.08.orig/contrib/suse/README.txt boxbackup-0.08/contrib/suse/README.txt
--- boxbackup-0.08.orig/contrib/suse/README.txt	1970-01-01 01:00:00.000000000 +0100
+++ boxbackup-0.08/contrib/suse/README.txt	2004-09-24 12:31:08.965542115 +0100
@@ -0,0 +1,5 @@
+These start scripts are for SUSE Linux. If installed manually they should be
+placed in /etc/init.d.
+
+Copyright (c)2004, Nothing But Net Limited
+<chris.smith@nothingbutnet.co.nz>
diff -urN boxbackup-0.08.orig/LINUX.txt boxbackup-0.08/LINUX.txt
--- boxbackup-0.08.orig/LINUX.txt	2004-09-23 10:56:11.000000000 +0100
+++ boxbackup-0.08/LINUX.txt	2004-09-24 12:46:35.871776371 +0100
@@ -1,7 +1,6 @@
 
 For instructions on building an RPM of Box Backup, see the contrib/rpm
-directory. This is primarily for RedHat style systems, but notes are provided
-on what needs to be modified for SUSE.
+directory.
 
 
 Requirements:

--=-cBEOfq3ONFiChLQID5i+--