[Box Backup-commit] COMMIT r2094 - in box/trunk: . bin/bbackupd bin/bbstored contrib/debian contrib/redhat contrib/rpm contrib/solaris contrib/suse documentation infrastructure

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Wed, 27 Feb 2008 18:50:45 +0000 (UTC)


Author: jamesog
Date: 2008-02-27 18:50:44 +0000 (Wed, 27 Feb 2008)
New Revision: 2094

Modified:
   box/trunk/bin/bbackupd/bbackupd-config.in
   box/trunk/bin/bbstored/bbstored-config.in
   box/trunk/configure.ac
   box/trunk/contrib/debian/bbackupd.in
   box/trunk/contrib/debian/bbstored.in
   box/trunk/contrib/redhat/bbackupd.in
   box/trunk/contrib/redhat/bbstored.in
   box/trunk/contrib/rpm/boxbackup.spec
   box/trunk/contrib/solaris/bbackupd-smf-method.in
   box/trunk/contrib/solaris/bbstored-smf-method.in
   box/trunk/contrib/suse/bbackupd.in
   box/trunk/contrib/suse/bbstored.in
   box/trunk/documentation/adminguide.xml
   box/trunk/infrastructure/BoxPlatform.pm.in
Log:
* Move all commands from bin to sbin on Unix platforms
* Update all associated docs and contributed distribution files



Modified: box/trunk/bin/bbackupd/bbackupd-config.in
===================================================================
--- box/trunk/bin/bbackupd/bbackupd-config.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/bin/bbackupd/bbackupd-config.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -577,7 +577,7 @@
    more files will be backed up. You want to know about this.
 
 6) Start the backup daemon with the command
-      @bindir_expanded@/bbackupd$daemon_args
+      @sbindir_expanded@/bbackupd$daemon_args
    in /etc/rc.local, or your local equivalent.
    Note that bbackupd must run as root.
 __E

Modified: box/trunk/bin/bbstored/bbstored-config.in
===================================================================
--- box/trunk/bin/bbstored/bbstored-config.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/bin/bbstored/bbstored-config.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -234,7 +234,7 @@
 4) Create accounts with bbstoreaccounts
 
 5) Start the backup store daemon with the command
-      @bindir_expanded@/bbstored$daemon_args
+      @sbindir_expanded@/bbstored$daemon_args
    in /etc/rc.local, or your local equivalent.
 
 ===================================================================

Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/configure.ac	2008-02-27 18:50:44 UTC (rev 2094)
@@ -279,10 +279,10 @@
 saved_exec_prefix=$exec_prefix
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-bindir_expanded=`       eval "echo $bindir"`
-bindir_expanded=`       eval "echo $bindir_expanded"`
-sysconfdir_expanded=`   eval "echo $sysconfdir"`
-localstatedir_expanded=`eval "echo $localstatedir"`
+eval bindir_expanded=`       eval "echo $bindir"`
+eval sbindir_expanded=`      eval "echo $sbindir"`
+eval sysconfdir_expanded=`   eval "echo $sysconfdir"`
+eval localstatedir_expanded=`eval "echo $localstatedir"`
 prefix=$saved_prefix
 exec_prefix=$saved_exec_prefix
 AC_SUBST([bindir_expanded sysconfdir_expanded localstatedir_expanded])

Modified: box/trunk/contrib/debian/bbackupd.in
===================================================================
--- box/trunk/contrib/debian/bbackupd.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/contrib/debian/bbackupd.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -2,7 +2,7 @@
 
 # Start and stop the Box Backup client daemon.
 
-BBACKUPD=@bindir_expanded@/bbackupd
+BBACKUPD=@sbindir_expanded@/bbackupd
 CONFIG=@sysconfdir_expanded@/box/bbackupd.conf
 PIDFILE=@localstatedir_expanded@/bbackupd.pid
 

Modified: box/trunk/contrib/debian/bbstored.in
===================================================================
--- box/trunk/contrib/debian/bbstored.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/contrib/debian/bbstored.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -2,7 +2,7 @@
 
 # Start and stop the Box Backup server daemon.
 
-BBSTORED=@bindir_expanded@/bbstored
+BBSTORED=@sbindir_expanded@/bbstored
 CONFIG=@sysconfdir_expanded@/box/bbstored.conf
 PIDFILE=@localstatedir_expanded@/bbstored.pid
 

Modified: box/trunk/contrib/redhat/bbackupd.in
===================================================================
--- box/trunk/contrib/redhat/bbackupd.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/contrib/redhat/bbackupd.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -23,7 +23,7 @@
 
 start() {
 	echo -n $"Starting $prog: "
-	daemon $prog
+	daemon @sbindir_expanded@/$prog
 	RETVAL=$?
 	echo
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
@@ -32,7 +32,7 @@
 
 stop() {
 	echo -n $"Stopping $prog: "
-	killproc $prog
+	killproc @sbindir_expanded@/$prog
 	RETVAL=$?
 	echo
 	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
@@ -40,7 +40,7 @@
 }
 
 rhstatus() {
-	status $prog
+	status @sbindir_expanded@/$prog
 }
 
 restart() {
@@ -50,7 +50,7 @@
 
 reload() {
         echo -n $"Reloading $prog configuration: "
-        killproc $prog -HUP
+        killproc @sbindir_expanded@/$prog -HUP
         retval=$?
         echo
         return $RETVAL

Modified: box/trunk/contrib/redhat/bbstored.in
===================================================================
--- box/trunk/contrib/redhat/bbstored.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/contrib/redhat/bbstored.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -23,7 +23,7 @@
 
 start() {
 	echo -n $"Starting $prog: "
-	daemon $prog
+	daemon @sbindir_expanded@/$prog
 	RETVAL=$?
 	echo
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
@@ -32,7 +32,7 @@
 
 stop() {
 	echo -n $"Stopping $prog: "
-	killproc $prog
+	killproc @sbindir_expanded@/$prog
 	RETVAL=$?
 	echo
 	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
@@ -40,7 +40,7 @@
 }
 
 rhstatus() {
-	status $prog
+	status @sbindir_expanded@/$prog
 }
 
 restart() {
@@ -50,7 +50,7 @@
 
 reload() {
         echo -n $"Reloading $prog configuration: "
-        killproc $prog -HUP
+        killproc @sbindir_expanded@/$prog -HUP
         retval=$?
         echo
         return $RETVAL

Modified: box/trunk/contrib/rpm/boxbackup.spec
===================================================================
--- box/trunk/contrib/rpm/boxbackup.spec	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/contrib/rpm/boxbackup.spec	2008-02-27 18:50:44 UTC (rev 2094)
@@ -39,8 +39,8 @@
 Release: 1
 License: BSD
 Group: Applications/Archiving
-Packager: Martin Ebourne <boxbackup-dev@fluffy.co.uk>
-URL: http://www.fluffy.co.uk/boxbackup/
+Packager: Martin Ebourne <boxbackup-dev@boxbackup.org>
+URL: http://www.boxbackup.org/
 Source0: %{ident}.tgz
 Requires: openssl >= 0.9.7a
 BuildRoot: %{_tmppath}/%{ident}-%{release}-root
@@ -143,7 +143,7 @@
 %define server_dir parcels/%{ident}-backup-server-linux-gnu
 install %{server_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}
 install %{server_dir}/bbstoreaccounts $RPM_BUILD_ROOT%{_sbindir}
-install %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_bindir}
+install %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_sbindir}
 install %{server_dir}/bbstored-config $RPM_BUILD_ROOT%{_sbindir}
 install %{server_dir}/raidfile-config $RPM_BUILD_ROOT%{_sbindir}
 

Modified: box/trunk/contrib/solaris/bbackupd-smf-method.in
===================================================================
--- box/trunk/contrib/solaris/bbackupd-smf-method.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/contrib/solaris/bbackupd-smf-method.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -5,7 +5,7 @@
 
         # SMF arguments (start and restart [really "refresh"])
 'start')
-        @bindir_expanded@/bbackupd
+        @sbindir_expanded@/bbackupd
         ;;
 
 'restart')

Modified: box/trunk/contrib/solaris/bbstored-smf-method.in
===================================================================
--- box/trunk/contrib/solaris/bbstored-smf-method.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/contrib/solaris/bbstored-smf-method.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -4,7 +4,7 @@
 
         # SMF arguments (start and restart [really "refresh"])
 'start')
-        @bindir_expanded@/bbstored
+        @sbindir_expanded@/bbstored
         ;;
 
 'restart')

Modified: box/trunk/contrib/suse/bbackupd.in
===================================================================
--- box/trunk/contrib/suse/bbackupd.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/contrib/suse/bbackupd.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -28,7 +28,7 @@
 ### END INIT INFO
 
 # Check for missing binaries (stale symlinks should not happen)
-BBACKUPD_BIN=@bindir_expanded@/bbackupd
+BBACKUPD_BIN=@sbindir_expanded@/bbackupd
 if [ ! -x $BBACKUPD_BIN ] ; then
 	echo "$BBACKUPD_BIN not installed"
 	exit 5

Modified: box/trunk/contrib/suse/bbstored.in
===================================================================
--- box/trunk/contrib/suse/bbstored.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/contrib/suse/bbstored.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -29,7 +29,7 @@
 # 
 
 # Check for missing binaries (stale symlinks should not happen)
-BBSTORED_BIN=@bindir_expanded@/bbstored
+BBSTORED_BIN=@sbindir_expanded@/bbstored
 if [ ! -x $BBSTORED_BIN ] ; then
 	echo "$BBSTORED_BIN not installed"
 	exit 5

Modified: box/trunk/documentation/adminguide.xml
===================================================================
--- box/trunk/documentation/adminguide.xml	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/documentation/adminguide.xml	2008-02-27 18:50:44 UTC (rev 2094)
@@ -96,11 +96,11 @@
         <programlisting>mkdir /tmp/boxbackupRepository                        # Create the directory
 chown _bbstored /tmp/boxbackupRepository/             # Change the owner to the new boxbackup daemon user
 
-/usr/local/bin/raidfile-config /etc/box/  1024 /tmp/boxbackupRepository
+/usr/local/sbin/raidfile-config /etc/box/  1024 /tmp/boxbackupRepository
 
 #substitute 1024 with the desired blocksize
 #substitute /tmp/boxbackupRepository with a directory that exists where you want the backup store located
-#/usr/local/bin/raidfile-config --help shows you the options</programlisting>
+#/usr/local/sbin/raidfile-config --help shows you the options</programlisting>
 
         <para>Then create the configuration file /etc/box/bbstored.conf The
         hostname is tricky as it is used for two things: The name of the
@@ -111,7 +111,7 @@
         <literal>ListenAddresses</literal> directive in the
         <filename>/etc/box/bbstored.conf</filename> file.</para>
 
-        <programlisting>/usr/local/bin/bbstored-config /etc/box hostname _bbstored</programlisting>
+        <programlisting>/usr/local/sbin/bbstored-config /etc/box hostname _bbstored</programlisting>
 
         <para>This last step outputs 5 instructions that you must execute to
         the letter. A lot of questions are raised on the mailing list because
@@ -164,7 +164,7 @@
 
           <para>To setup the basic key structure, do the following:</para>
 
-          <programlisting>/usr/local/bin/bbstored-certs ca init</programlisting>
+          <programlisting>/usr/local/sbin/bbstored-certs ca init</programlisting>
 
           <para>(See <ulink url="instguide.xml">OpenSSL notes</ulink> if you
           get an OpenSSL error)</para>
@@ -181,7 +181,7 @@
           request (CSR) for you. Transfer it to the machine with your CA, then
           do:</para>
 
-          <programlisting>/usr/local/bin/bbstored-certs ca sign-server hostname-csr.pem</programlisting>
+          <programlisting>/usr/local/sbin/bbstored-certs ca sign-server hostname-csr.pem</programlisting>
 
           <para>This signs the certificate for the server. Follow the
           instructions in the output on which files to install on the server.
@@ -199,7 +199,7 @@
           0, for example, 1 or 75AB23C. Then on the backup store server,
           create the account with:</para>
 
-          <programlisting>/usr/local/bin/bbstoreaccounts create 75AB23C 0 4096M 4505M</programlisting>
+          <programlisting>/usr/local/sbin/bbstoreaccounts create 75AB23C 0 4096M 4505M</programlisting>
 
           <para>This looks complicated. The numbers are, in order:</para>
 
@@ -261,7 +261,7 @@
 
           <para>Sign this CSR with this command:</para>
 
-          <programlisting>/usr/local/bin/bbstored-certs ca sign 75AB23C-csr.pem</programlisting>
+          <programlisting>/usr/local/sbin/bbstored-certs ca sign 75AB23C-csr.pem</programlisting>
 
           <para>Don't forget to check that the embedded account number is
           correct! Then send the two files back to the user, as instructed by
@@ -345,7 +345,7 @@
           the configuration files and generate a private key and certificate
           request.</para>
 
-          <programlisting>/usr/local/bin/bbackupd-config /etc/box lazy <emphasis
+          <programlisting>/usr/local/sbin/bbackupd-config /etc/box lazy <emphasis
               role="bold">999 hostname</emphasis> /var/bbackupd <emphasis
               role="bold">/home</emphasis></programlisting>
 
@@ -407,7 +407,7 @@
           basic bbackupd configuration.</para>
 
           <para>You can then run the daemon (as root) by running
-          <command>/usr/local/bin/bbackupd</command>, and of course, adding it
+          <command>/usr/local/sbin/bbackupd</command>, and of course, adding it
           to your system's startup scripts. The first time it's run it will
           upload everything. Interrupting it and restarting it will only
           upload files which were not uploaded before - it's very
@@ -517,7 +517,7 @@
             here -- they may be different for your system.</para>
           </important>
 
-          <programlisting>/usr/local/bin/bbackupd-config /etc/box lazy 51 server.example.com /var/bbackupd /home /etc/samba
+          <programlisting>/usr/local/sbin/bbackupd-config /etc/box lazy 51 server.example.com /var/bbackupd /home /etc/samba
 
 Setup bbackupd config utility.
 
@@ -579,7 +579,7 @@
    more files will be backed up. You want to know about this.
 
 6) Start the backup daemon with the command
-      /usr/local/bin/bbackupd
+      /usr/local/sbin/bbackupd
    in /etc/rc.local, or your local equivalent.
    Note that bbackupd must run as root.
 
@@ -1304,7 +1304,7 @@
 
         <para>The command line syntax is:</para>
 
-        <programlisting>/usr/local/bin/bbackupctl [-q] [-c config-file] command</programlisting>
+        <programlisting>/usr/local/sbin/bbackupctl [-q] [-c config-file] command</programlisting>
 
         <para>The -q option reduces the amount of output the program emits,
         and -c allows an alternative configuration file to be
@@ -1358,7 +1358,7 @@
         <para>Use bbackupd-config to write a configuration file in snapshot
         mode, and then run the following command as a cron job.</para>
 
-        <programlisting>/usr/local/bin/bbackupctl -q sync</programlisting>
+        <programlisting>/usr/local/sbin/bbackupctl -q sync</programlisting>
 
         <para>This will cause the backup daemon to upload all changed files
         immediately. <emphasis role="bold">bbackupctl</emphasis> will exit
@@ -1376,7 +1376,7 @@
           for this account. Either use the usage command in interactive mode,
           or type:</para>
 
-          <programlisting>/usr/local/bin/bbackupquery -q usage quit</programlisting>
+          <programlisting>/usr/local/sbin/bbackupquery -q usage quit</programlisting>
 
           <para>to show the space used as a single command.</para>
         </section>
@@ -1388,11 +1388,11 @@
           the limits. To display the space used on the server for an account,
           use:</para>
 
-          <programlisting>/usr/local/bin/bbstoreaccounts info 75AB23C</programlisting>
+          <programlisting>/usr/local/sbin/bbstoreaccounts info 75AB23C</programlisting>
 
           <para>To adjust the soft and hard limits on an account, use:</para>
 
-          <programlisting>/usr/local/bin/bbstoreaccounts setlimit 75AB23C new-soft-limit new-hard-limit</programlisting>
+          <programlisting>/usr/local/sbin/bbstoreaccounts setlimit 75AB23C new-soft-limit new-hard-limit</programlisting>
 
           <para>You do not need to restart the server.</para>
         </section>
@@ -1538,7 +1538,7 @@
           regularly, and check its output. You can run the command manually as
           follows:</para>
 
-          <programlisting>/usr/local/bin/bbackupquery "compare -a" quit</programlisting>
+          <programlisting>/usr/local/sbin/bbackupquery "compare -a" quit</programlisting>
 
           <para>This command will report all the differences found between the
           store and the files on disc. It will download everything, so may
@@ -1561,7 +1561,7 @@
           <para>If you would like to do a "quick" check which just downloads
           file checksums and compares against that, then run:</para>
 
-          <programlisting>/usr/local/bin/bbackupquery "compare -aq" quit</programlisting>
+          <programlisting>/usr/local/sbin/bbackupquery "compare -aq" quit</programlisting>
 
           <para>However, this does not check that the file attributes are
           correct, and since the checksums are generated on the client they
@@ -1595,7 +1595,7 @@
 
           <para>Type:</para>
 
-          <programlisting>/usr/local/bin/bbackupquery</programlisting>
+          <programlisting>/usr/local/sbin/bbackupquery</programlisting>
 
           <para>to run it in interactive mode.</para>
 
@@ -1628,7 +1628,7 @@
           <para>Firstly, run bbackupquery in interactive mode. It behaves in a
           similar manner to a command line sftp client.</para>
 
-          <programlisting>/usr/local/bin/bbackupquery</programlisting>
+          <programlisting>/usr/local/sbin/bbackupquery</programlisting>
 
           <para>Then navigate to the directory containing the file you want,
           using list, cd and pwd.</para>
@@ -1744,14 +1744,14 @@
         <para>First, run the check utility, and see what errors it
         reports.</para>
 
-        <programlisting>/usr/local/bin/bbstoreaccounts check 1234</programlisting>
+        <programlisting>/usr/local/sbin/bbstoreaccounts check 1234</programlisting>
 
         <para>This will take some time, and use a fair bit of memory (about 16
         bytes per file and directory). If the output looks plausible and
         reports errors which need fixing, run it again but with the fix
         flag:</para>
 
-        <programlisting>/usr/local/bin/bbstoreaccounts check 1234 fix</programlisting>
+        <programlisting>/usr/local/sbin/bbstoreaccounts check 1234 fix</programlisting>
 
         <para>This will fix any errors, and remove unrecoverable files.
         Directories will be recreated if necessary.</para>
@@ -1841,7 +1841,7 @@
         configuration file locations to daemons and programs. For
         example</para>
 
-        <programlisting>/usr/local/bin/bbstored /some/other/dir/bbstored.config /usr/local/bin/bbackupquery -c /some/other/dir/bbackupd.config</programlisting>
+        <programlisting>/usr/local/sbin/bbstored /some/other/dir/bbstored.config /usr/local/sbin/bbackupquery -c /some/other/dir/bbackupd.config</programlisting>
 
         <para>(daemons specify the name as the first argument, utility
         programs with the -c option).</para>

Modified: box/trunk/infrastructure/BoxPlatform.pm.in
===================================================================
--- box/trunk/infrastructure/BoxPlatform.pm.in	2008-02-25 00:48:07 UTC (rev 2093)
+++ box/trunk/infrastructure/BoxPlatform.pm.in	2008-02-27 18:50:44 UTC (rev 2094)
@@ -76,7 +76,7 @@
 	}
 
 	# where to put the files
-	$install_into_dir = '@bindir_expanded@';
+	$install_into_dir = '@sbindir_expanded@';
 
 	# if it's Darwin,
 	if($build_os eq 'Darwin')