"John R. Jackson" <[EMAIL PROTECTED]> writes:
> This is similar to the -h flag for dump on Linux. Look at how
> dump-honor-nodump in configure.in for is handled and add something
> similar. Then find the XFSDUMP code in client-src/sendbackup-dump.c and
> add a couple of lines to insert "-e" if HAVE_HONOR_SGI_XFSDUMP_SKIP_FILE
> (or whatever you call it) is defined.
Okay, the patch (against the then latest version from CVS) is done,
although I'm not completely sure it's optimal. Find it attached to
this message (it's pretty short).
Index: configure.in
===================================================================
RCS file: /cvsroot/amanda/amanda/configure.in,v
retrieving revision 1.188.2.45.2.7
diff -u -r1.188.2.45.2.7 configure.in
--- configure.in 16 Aug 2001 22:18:28 -0000 1.188.2.45.2.7
+++ configure.in 19 Feb 2002 01:27:36 -0000
@@ -1417,6 +1417,36 @@
AC_DEFINE_UNQUOTED(XFSRESTORE,"$XFSRESTORE",[Define the location of the
xfsrestore program on Irix hosts. ])
AC_MSG_WARN([*** xfsdump causes the setuid-root rundump program to be enabled])
AC_MSG_WARN([*** to disable it, just #undef XFSDUMP in config/config.h])
+ AC_ARG_WITH(xfsdump-honor-skipfile,
+ [ --with-xfsdump-honor-skipfile if xfsdump supports -e, use it],
+ [ if test -x $XFSDUMP; then
+ AC_CACHE_CHECK(
+ [whether $XFSDUMP supports -e (honor XFS skip file attribute)],
+ amanda_cv_honor_skipfile,
+ [
+ case "$XFSDUMP" in
+ *xfsdump)
+ AC_TRY_COMMAND($XFSDUMP --help 2>&1
+ | $GREP \ [-]e >conftest.d)
+ if test -s conftest.d; then
+ amanda_cv_honor_skipfile=yes
+ else
+ amanda_cv_honor_skipfile=no
+ fi
+ rm -f conftest.d
+ ;;
+ *) amanda_cv_honor_skipfile=no
+ ;;
+ esac
+ ])
+ else
+ AC_MSG_WARN([*** $XFSDUMP not excutable, cannot run -e test])
+ amanda_cv_honor_skipfile=no
+ fi
+ if test "$amanda_cv_honor_skipfile" = yes; then
+ AC_DEFINE(HAVE_HONOR_SGI_XFSDUMP_SKIP_FILE,1,[Define this if xfsdump
+accepts -e for honoring the skip-file attribute.])
+ fi
+ ])
fi
VXSYSLOCPATH="$SYSLOCPATH:/usr/lib/fs/vxfs"
Index: client-src/sendbackup-dump.c
===================================================================
RCS file: /cvsroot/amanda/amanda/client-src/sendbackup-dump.c,v
retrieving revision 1.65.2.5.4.2
diff -u -r1.65.2.5.4.2 sendbackup-dump.c
--- client-src/sendbackup-dump.c 7 May 2001 20:29:55 -0000 1.65.2.5.4.2
+++ client-src/sendbackup-dump.c 19 Feb 2002 01:27:36 -0000
@@ -215,6 +215,9 @@
dumppid = pipespawn(progname, STDIN_PIPE,
&dumpin, &dumpout, &mesgf,
"xfsdump",
+#ifdef HAVE_HONOR_SGI_XFSDUMP_SKIP_FILE
+ "-e",
+#endif
no_record ? "-J" : skip_argument,
"-F",
"-l", dumpkeys,
Index: client-src/sendsize.c
===================================================================
RCS file: /cvsroot/amanda/amanda/client-src/sendsize.c,v
retrieving revision 1.97.2.13.4.6
diff -u -r1.97.2.13.4.6 sendsize.c
--- client-src/sendsize.c 1 Sep 2001 20:47:58 -0000 1.97.2.13.4.6
+++ client-src/sendsize.c 19 Feb 2002 01:27:37 -0000
@@ -652,8 +652,13 @@
#endif /* } */
{
char *name = " (xfsdump)";
+#ifdef HAVE_HONOR_SGI_XFSDUMP_SKIP_FILE
+ dbprintf(("%s: running \"%s%s -e -F -J -l %s - %s\"\n",
+ prefix, cmd, name, level_str, device));
+#else
dbprintf(("%s: running \"%s%s -F -J -l %s - %s\"\n",
prefix, cmd, name, level_str, device));
+#endif
}
else
#endif /* } */
@@ -807,8 +812,13 @@
#else
if (1)
#endif
+#ifdef HAVE_HONOR_SGI_XFSDUMP_SKIP_FILE
+ execle(cmd, "xfsdump", "-e", "-F", "-J", "-l", level_str, "-", device,
+ (char *)0, safe_env());
+#else
execle(cmd, "xfsdump", "-F", "-J", "-l", level_str, "-", device,
(char *)0, safe_env());
+#endif
else
#endif
#ifdef VXDUMP
--
Jason Henry Parker ``Choose mnemonic identifiers. If you
Systems Administrator can't remember what mnemonic means,
[EMAIL PROTECTED] you've got a problem.'' -- Larry Wall