Index: dump.8 =================================================================== --- dump.8 (revision 342383) +++ dump.8 (working copy) @@ -38,7 +38,7 @@ .Nd file system backup .Sh SYNOPSIS .Nm -.Op Fl 0123456789acLnrRSu +.Op Fl 0123456789acLnrRSuy .Op Fl B Ar records .Op Fl b Ar blocksize .Op Fl C Ar cachesize @@ -210,6 +210,9 @@ Subject to the media size specified by .Fl B , each volume is written in this manner as if the output were a tape drive. +.It Fl y +Do not wait for confirmation after each volume. +This is useful for automated scripts without human intervention. .It Fl h Ar level Honor the user .Dq nodump Index: dump.h =================================================================== --- dump.h (revision 342383) +++ dump.h (working copy) @@ -80,6 +80,7 @@ int rsync_friendly; /* be friendly with rsync */ int notify; /* notify operator flag */ +int skip_vol_query; /* skip operator query on volume change */ int blockswritten; /* number of blocks written on current tape */ int tapeno; /* current tape number */ time_t tstart_writing; /* when started writing the first tape block */ Index: main.c =================================================================== --- main.c (revision 342383) +++ main.c (working copy) @@ -74,6 +74,7 @@ #include "pathnames.h" int notify = 0; /* notify operator flag */ +int skip_vol_query = 0; /* skip operator query on volume change */ int snapdump = 0; /* dumping live filesystem, so use snapshot */ int blockswritten = 0; /* number of blocks written on current tape */ int tapeno = 0; /* current tape number */ @@ -122,7 +123,7 @@ obsolete(&argc, &argv); while ((ch = getopt(argc, argv, - "0123456789aB:b:C:cD:d:f:h:LnP:RrSs:T:uWw")) != -1) + "0123456789aB:b:C:cD:d:f:h:LnP:RrSs:T:uWwy")) != -1) switch (ch) { /* dump level */ case '0': case '1': case '2': case '3': case '4': @@ -221,6 +222,10 @@ uflag = 1; break; + case 'y': + skip_vol_query = 1; + break; + case 'W': /* what to do */ case 'w': lastdump(ch); @@ -606,7 +611,7 @@ usage(void) { fprintf(stderr, - "usage: dump [-0123456789acLnSu] [-B records] [-b blocksize] [-C cachesize]\n" + "usage: dump [-0123456789acLnSuy] [-B records] [-b blocksize] [-C cachesize]\n" " [-D dumpdates] [-d density] [-f file | -P pipecommand] [-h level]\n" " [-s feet] [-T date] filesystem\n" " dump -W | -w\n"); Index: tape.c =================================================================== --- tape.c (revision 342383) +++ tape.c (working copy) @@ -380,7 +380,7 @@ msg("Change Volumes: Mount volume #%d\n", tapeno+1); broadcast("CHANGE DUMP VOLUMES!\a\a\n"); } - while (!query("Is the new volume mounted and ready to go?")) + while (!skip_vol_query && !query("Is the new volume mounted and ready to go?")) if (query("Do you want to abort?")) { dumpabort(0); /*NOTREACHED*/