#undef HAVE_CYGWIN
#undef HAVE_OSF1_OS
#undef HAVE_DARWIN_OS
+#undef HAVE_HURD_OS
/* Set to correct scanf value for long long int */
#undef lld
BA_CONDITIONAL(HAVE_SUN_OS, $FALSEPRG)
fi
+if test $HAVE_UNAME=yes -a x`uname -s` = xGNU
+then
+ BA_CONDITIONAL(HAVE_HURD_OS, $TRUEPRG)
+ AC_DEFINE(HAVE_HURD_OS)
+else
+ BA_CONDITIONAL(HAVE_HURD_OS, $FALSEPRG)
+fi
+
if test $HAVE_UNAME=yes -a x`uname -s` = xOSF1
then
BA_CONDITIONAL(HAVE_OSF1_OS, $TRUEPRG)
elif test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
then
DISTNAME=solaris
+elif test $HAVE_UNAME=yes -a x`uname -s` = xGNU
+then
+ DISTNAME=hurd
elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
then
DISTNAME=freebsd
platforms/freebsd/bacula-dir"
largefile_support="yes"
;;
+hurd)
+ DISTVER=`uname -r`
+ TAPEDRIVE="/dev/nst0"
+ PSCMD="ps -e -o pid,command"
+ PFILES="${PFILES} \
+ platforms/hurd/Makefile \
+ platforms/hurd/bacula-fd \
+ platforms/hurd/bacula-sd \
+ platforms/hurd/bacula-dir"
+ ;;
hpux)
PSCMD="UNIX95=1; ps -e -o pid,comm"
CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL = @INSTALL@
-SUBDIRS = freebsd redhat solaris unknown openbsd osx irix gentoo \
+SUBDIRS = hurd freebsd redhat solaris unknown openbsd osx irix gentoo \
debian darwin aix bsdi mandrake slackware alpha ubuntu systemd
MAKE = make
--- /dev/null
+#
+# This file is used as the template to create the
+# Makefile for the Debian GNU Hurd specific installation.
+#
+# 21 March 2008 -- Kern Sibbald
+#
+# for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 754
+
+nothing:
+
+install: install-autostart
+
+install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
+
+install_logrotate:
+ @$(INSTALL_PROGRAM) ../../scripts/logrotate $(DESTDIR)/etc/logrotate.d/bacula
+
+install-autostart-fd: uninstall-autostart-fd
+ @echo "Installing bacula-fd boot script ..."
+ @$(INSTALL_PROGRAM) bacula-fd $(DESTDIR)/etc/init.d/bacula-fd
+ @echo "Installing bacula-fd symlinks ..."
+ @if test x$(DESTDIR) = x ; then \
+ /usr/sbin/update-rc.d bacula-fd start 91 2 3 4 5 . stop 9 0 1 6 .; \
+ fi
+
+
+install-autostart-sd: uninstall-autostart-sd
+ @echo "Installing bacula-sd boot script ..."
+ @$(INSTALL_PROGRAM) bacula-sd $(DESTDIR)/etc/init.d/bacula-sd
+ @echo "Installing bacula-sd symlinks ..."
+ @if test "x$(DESTDIR)" = "x" ; then \
+ /usr/sbin/update-rc.d bacula-sd start 91 2 3 4 5 . stop 9 0 1 6 .; \
+ fi
+
+
+install-autostart-dir: uninstall-autostart-dir
+ @echo "Installing bacula-dir boot script ..."
+ @$(INSTALL_PROGRAM) bacula-dir $(DESTDIR)/etc/init.d/bacula-dir
+ @echo "Installing bacula-dir symlinks ..."
+ @if test "x$(DESTDIR)" = "x" ; then \
+ /usr/sbin/update-rc.d bacula-dir start 90 2 3 4 5 . stop 9 0 1 6 .; \
+ fi
+
+
+uninstall: uninstall-autostart
+
+uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
+
+uninstall-logrotate:
+ @rm -f $(DESTDIR)/etc/logrotate.d/bacula
+
+uninstall-autostart-fd:
+ @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-fd; then \
+ /etc/init.d/bacula-fd stop; \
+ rm -f $(DESTDIR)/etc/init.d/bacula-fd; \
+ /usr/sbin/update-rc.d bacula-fd remove; \
+ fi
+
+
+uninstall-autostart-sd:
+ @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-sd; then \
+ /etc/init.d/bacula-sd stop; \
+ rm -f $(DESTDIR)/etc/init.d/bacula-sd; \
+ /usr/sbin/update-rc.d bacula-sd remove; \
+ fi
+
+uninstall-autostart-dir:
+ @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-dir; then \
+ /etc/init.d/bacula-dir stop; \
+ rm -f $(DESTDIR)/etc/init.d/bacula-dir; \
+ /usr/sbin/update-rc.d bacula-dir remove; \
+ fi
+ @rm -f $(DESTDIR)/etc/init.d/bacula-dir
+
+clean:
+ @rm -f 1 2 3
+
+distclean: clean
+ @rm -f Makefile
+ @rm -f bacula-sd bacula-fd bacula-dir
+
+devclean: clean
+ @rm -f Makefile
+ @rm -f bacula-sd bacula-fd bacula-dir
--- /dev/null
+#! /bin/sh
+#
+# bacula This shell script takes care of starting and stopping
+# the bacula Director daemon on Debian GNU Hurd systems.
+#
+# Kern E. Sibbald - 21 March 2008
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+### BEGIN INIT INFO
+# Provides: bacula-dir
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start @BACULA@ Director daemon at boot time
+# Description: Enable @BACULA@ Director.
+### END INIT INFO
+#
+
+NAME="bacula-dir"
+DESC="@BACULA@ Director"
+DAEMON=@sbindir@/${NAME}
+BUSER=@dir_user@
+BGROUP=@dir_group@
+BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BPORT=@dir_port@
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -f $DAEMON || exit 0
+
+if [ -n "`getent services ${NAME}`" ]; then
+ BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'`
+fi
+
+if [ -f /etc/default/$NAME ]; then
+ . /etc/default/$NAME
+fi
+
+PIDFILE=@piddir@/${NAME}.${BPORT}.pid
+
+if [ "x${BUSER}" != "x" ]; then
+ USERGRP="--chuid ${BUSER}"
+ if [ "x${BGROUP}" != "x" ]; then
+ USERGRP="${USERGRP}:${BGROUP}"
+ fi
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+ start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit $RETVAL
--- /dev/null
+#! /bin/sh
+#
+# bacula This shell script takes care of starting and stopping
+# the bacula Director daemon on Debian GNU Hurd systems.
+#
+# Kern E. Sibbald - 21 March 2008
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+### BEGIN INIT INFO
+# Provides: bacula-fd
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start @BACULA@ Client daemon at boot time
+# Description: Enable @BACULA@ Client.
+### END INIT INFO
+
+
+NAME="bacula-fd"
+DESC="@BACULA@ File Daemon"
+DAEMON=@sbindir@/${NAME}
+BUSER=@fd_user@
+BGROUP=@fd_group@
+BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BPORT=@fd_port@
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -f $DAEMON || exit 0
+
+if [ -n "`getent services ${NAME}`" ]; then
+ BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'`
+fi
+
+if [ -f /etc/default/$NAME ]; then
+ . /etc/default/$NAME
+fi
+
+PIDFILE=@piddir@/${NAME}.${BPORT}.pid
+
+if [ "x${BUSER}" != "x" ]; then
+ USERGRP="--chuid ${BUSER}"
+ if [ "x${BGROUP}" != "x" ]; then
+ USERGRP="${USERGRP}:${BGROUP}"
+ fi
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+ start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit $RETVAL
--- /dev/null
+#! /bin/sh
+#
+# bacula This shell script takes care of starting and stopping
+# the bacula Director daemon on Debian GNU Hurd systems.
+#
+# Kern E. Sibbald - 21 March 2008
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+### BEGIN INIT INFO
+# Provides: bacula-sd
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start @BACULA@ Storage daemon at boot time
+# Description: Enable @BACULA@ Storage daemon.
+### END INIT INFO
+
+
+NAME="bacula-sd"
+DESC="@BACULA@ Storage Daemon"
+DAEMON=@sbindir@/${NAME}
+BUSER=@sd_user@
+BGROUP=@sd_group@
+BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BPORT=@sd_port@
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -f $DAEMON || exit 0
+
+if [ -n "`getent services ${NAME}`" ]; then
+ BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'`
+fi
+
+if [ -f /etc/default/$NAME ]; then
+ . /etc/default/$NAME
+fi
+
+PIDFILE=@piddir@/${NAME}.${BPORT}.pid
+
+if [ "x${BUSER}" != "x" ]; then
+ USERGRP="--chuid ${BUSER}"
+ if [ "x${BGROUP}" != "x" ]; then
+ USERGRP="${USERGRP}:${BGROUP}"
+ fi
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+ start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit $RETVAL
* - AIX (pre-5.3 and post 5.3 acls, acl_get and aclx_get interface)
* - Darwin
* - FreeBSD (POSIX and NFSv4/ZFS acls)
+ * - GNU Hurd
* - HPUX
* - IRIX
* - Linux
defined(HAVE_FREEBSD_OS) || \
defined(HAVE_IRIX_OS) || \
defined(HAVE_OSF1_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
#include <sys/types.h>
{
int count = 0;
#if defined(HAVE_FREEBSD_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
acl_entry_t ace;
int entry_available;
acl_entry_t ace;
acl_tag_t tag;
#if defined(HAVE_FREEBSD_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
int entry_available;
entry_available = acl_get_entry(acl, ACL_FIRST_ENTRY, &ace);
freebsd_parse_acl_streams;
#elif defined(HAVE_IRIX_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
/*
* Define the supported ACL streams for these OSes
*/
static int os_default_acl_streams[1] = {
STREAM_ACL_LINUX_DEFAULT_ACL
};
+#elif defined(HAVE_HURD_OS)
+static int os_access_acl_streams[1] = {
+ STREAM_ACL_HURD_ACCESS_ACL
+};
+static int os_default_acl_streams[1] = {
+ STREAM_ACL_HURD_DEFAULT_ACL
+};
#endif
static bacl_exit_code generic_build_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
* - AIX (Extended Attributes)
* - Darwin (Extended Attributes)
* - FreeBSD (Extended Attributes)
+ * - GNU HURD (Extended Attributes)
* - IRIX (Extended Attributes)
* - Linux (Extended Attributes)
* - NetBSD (Extended Attributes)
irix_parse_xattr_streams;
#elif defined(HAVE_DARWIN_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
#if (!defined(HAVE_LISTXATTR) && !defined(HAVE_LLISTXATTR)) || \
(!defined(HAVE_GETXATTR) && !defined(HAVE_LGETXATTR)) || \
static const char *xattr_skiplist[1] = {
NULL
};
+#elif defined(HAVE_HURD_OS)
+static int os_default_xattr_streams[1] = {
+ STREAM_XATTR_HURD
+};
+static const char *xattr_acl_skiplist[1] = {
+ NULL
+};
+static const char *xattr_skiplist[1] = {
+ NULL
+};
#endif
/*
#define BXATTR_ENOTSUP EOPNOTSUPP
#elif defined(HAVE_DARWIN_OS)
#define BXATTR_ENOTSUP ENOTSUP
+#elif defined(HAVE_HURD_OS)
+#define BXATTR_ENOTSUP ENOTSUP
#endif
/*
#include <sys/stat.h>
#if defined(HAVE_GETMNTENT)
-#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_AIX_OS)
+#if defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HPUX_OS) || \
+ defined(HAVE_AIX_OS)
#include <mntent.h>
#elif defined(HAVE_SUN_OS)
#include <sys/mnttab.h>
+#elif defined(HAVE_HURD_OS)
+#include <hurd/paths.h>
+#include <mntent.h>
#endif /* HAVE_GETMNTENT */
#elif defined(HAVE_GETMNTINFO)
#if defined(HAVE_OPENBSD_OS)
#if defined(HAVE_GETMNTENT)
FILE *fp;
struct stat st;
-#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_IRIX_OS) || defined(HAVE_AIX_OS)
+#if defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HPUX_OS) || \
+ defined(HAVE_IRIX_OS) || \
+ defined(HAVE_AIX_OS) || \
+ defined(HAVE_HURD_OS)
struct mntent *mnt;
#if defined(HAVE_LINUX_OS)
if ((fp = setmntent(MNTTAB, "r")) == (FILE *)NULL) {
return;
}
+#elif defined(HAVE_HURD_OS)
+ if ((fp = setmntent(_PATH_MNTTAB, "r")) == (FILE *)NULL) {
+ return;
+ }
#endif
while ((mnt = getmntent(fp)) != (struct mntent *)NULL) {
#define STREAM_ACL_FREEBSD_NFS4_ACL 1017 /* FreeBSD specific acl_t string representation
* from acl_to_text (NFSv4 or ZFS acl)
*/
+#define STREAM_ACL_HURD_DEFAULT_ACL 1018 /* GNU HURD specific acl_t string representation
+ * from acl_to_text (POSIX acl) for default acls.
+ */
+#define STREAM_ACL_HURD_ACCESS_ACL 1019 /* GNU HURD specific acl_t string representation
+ * from acl_to_text (POSIX acl) for access acls.
+ */
+#define STREAM_XATTR_HURD 1989 /* GNU HURD specific extended attributes */
#define STREAM_XATTR_IRIX 1990 /* IRIX specific extended attributes */
#define STREAM_XATTR_TRU64 1991 /* TRU64 specific extended attributes */
#define STREAM_XATTR_AIX 1992 /* AIX specific extended attributes */