]> git.wh0rd.org - dump.git/commitdiff
Makes dump abort (-q option) whenever it needs operator attention.
authorStelian Pop <stelian@popies.net>
Thu, 16 Aug 2001 09:37:57 +0000 (09:37 +0000)
committerStelian Pop <stelian@popies.net>
Thu, 16 Aug 2001 09:37:57 +0000 (09:37 +0000)
CHANGES
dump/dump.8.in
dump/dump.h
dump/main.c
dump/optr.c

diff --git a/CHANGES b/CHANGES
index 72a61c3f31d82b11efe1d95b9fb08d7a3fdb003c..204f3ebedf1b363db91003c4e0f546ba9c3369af 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.131 2001/08/14 13:11:58 stelian Exp $
+$Id: CHANGES,v 1.132 2001/08/16 09:37:57 stelian Exp $
 
 Changes between versions 0.4b23 and 0.4b24 (released ?????????????)
 ===================================================================
 
 Changes between versions 0.4b23 and 0.4b24 (released ?????????????)
 ===================================================================
@@ -13,6 +13,10 @@ Changes between versions 0.4b23 and 0.4b24 (released ?????????????)
        a compare (since it changes the working directory to the
        filesystem being compared in the process).
 
        a compare (since it changes the working directory to the
        filesystem being compared in the process).
 
+4.     Added the -q option to dump which makes dump abort 
+       whenever it needs operator attention. It should be
+       easier to use dump in scripts with this option.
+
 Changes between versions 0.4b22 and 0.4b23 (released July 20, 2001)
 ===================================================================
 
 Changes between versions 0.4b22 and 0.4b23 (released July 20, 2001)
 ===================================================================
 
index abbda7363ad047bce7a0161d01b9a7b8ac0c7dcc..206356b7658e6c10ceccb8e6ed4536049298b94c 100644 (file)
@@ -30,7 +30,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\"    $Id: dump.8.in,v 1.30 2001/07/19 09:03:44 stelian Exp $
+.\"    $Id: dump.8.in,v 1.31 2001/08/16 09:37:59 stelian Exp $
 .\"
 .Dd __DATE__
 .Dt DUMP 8
 .\"
 .Dd __DATE__
 .Dt DUMP 8
@@ -40,7 +40,7 @@
 .Nd ext2 filesystem backup
 .Sh SYNOPSIS
 .Nm dump
 .Nd ext2 filesystem backup
 .Sh SYNOPSIS
 .Nm dump
-.Op Fl 0123456789ackMnSu
+.Op Fl 0123456789ackMnqSu
 .Op Fl B Ar records
 .Op Fl b Ar blocksize
 .Op Fl d Ar density
 .Op Fl B Ar records
 .Op Fl b Ar blocksize
 .Op Fl d Ar density
@@ -253,6 +253,11 @@ notify all operators in the group
 .Dq operator
 by means similar to a
 .Xr wall 1 .
 .Dq operator
 by means similar to a
 .Xr wall 1 .
+.It Fl q
+Make
+.Nm
+abort immediately whenever operator attention is required,
+without prompting in case of write errors, tape changes etc.
 .It Fl Q Ar file
 Enable the Quick File Access support. Tape positions for each
 inode are stored into the file
 .It Fl Q Ar file
 Enable the Quick File Access support. Tape positions for each
 inode are stored into the file
index 4836ba855de95904e6f264fc183f203be7f8b77d..0e276b577fe1696fdbad444f485777e23cd58de5 100644 (file)
@@ -5,7 +5,7 @@
  *     Stelian Pop <pop@noos.fr>, 1999-2000
  *     Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
  *
  *     Stelian Pop <pop@noos.fr>, 1999-2000
  *     Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
  *
- *     $Id: dump.h,v 1.30 2001/08/13 16:17:52 stelian Exp $
+ *     $Id: dump.h,v 1.31 2001/08/16 09:37:59 stelian Exp $
  */
 
 /*-
  */
 
 /*-
@@ -75,6 +75,7 @@ extern char   lastlevel;      /* dump level of previous dump */
 extern char    level;          /* dump level of this dump */
 extern int     uflag;          /* update flag */
 extern int     Mflag;          /* multi-volume flag */
 extern char    level;          /* dump level of this dump */
 extern int     uflag;          /* update flag */
 extern int     Mflag;          /* multi-volume flag */
+extern int     qflag;          /* quit on errors flag */
 extern char    *eot_script;    /* end of volume script fiag */
 extern int     diskfd;         /* disk file descriptor */
 extern int     tapefd;         /* tape file descriptor */
 extern char    *eot_script;    /* end of volume script fiag */
 extern int     diskfd;         /* disk file descriptor */
 extern int     tapefd;         /* tape file descriptor */
index 7a5884b36ff44547e296e88f90abc38d79183d1d..8fcf468d7b0851259628e1bb2e8f81f53c776f37 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.56 2001/08/13 16:17:52 stelian Exp $";
+       "$Id: main.c,v 1.57 2001/08/16 09:37:59 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -104,6 +104,7 @@ char        lastlevel;      /* dump level of previous dump */
 char   level;          /* dump level of this dump */
 int    uflag;          /* update flag */
 int    Mflag;          /* multi-volume flag */
 char   level;          /* dump level of this dump */
 int    uflag;          /* update flag */
 int    Mflag;          /* multi-volume flag */
+int    qflag;          /* quit on errors flag */
 char   *eot_script;    /* end of volume script fiag */
 int    diskfd;         /* disk file descriptor */
 int    tapefd;         /* tape file descriptor */
 char   *eot_script;    /* end of volume script fiag */
 int    diskfd;         /* disk file descriptor */
 int    tapefd;         /* tape file descriptor */
@@ -235,7 +236,7 @@ main(int argc, char *argv[])
 #ifdef KERBEROS
                            "k"
 #endif
 #ifdef KERBEROS
                            "k"
 #endif
-                           "Mn"
+                           "Mnq"
 #ifdef USE_QFA
                            "Q:"
 #endif
 #ifdef USE_QFA
                            "Q:"
 #endif
@@ -345,6 +346,10 @@ main(int argc, char *argv[])
                        notify = 1;
                        break;
 
                        notify = 1;
                        break;
 
+               case 'q':
+                       qflag = 1;
+                       break;
+
 #ifdef USE_QFA
                case 'Q':               /* create tapeposfile */
                        gTapeposfile = optarg;
 #ifdef USE_QFA
                case 'Q':               /* create tapeposfile */
                        gTapeposfile = optarg;
@@ -949,7 +954,7 @@ usage(void)
 #ifdef KERBEROS
                "k"
 #endif
 #ifdef KERBEROS
                "k"
 #endif
-               "MnSu"
+               "MnqSu"
                "] [-B records] [-b blocksize] [-d density]\n"
                "\t%s [-e inode#,inode#,...] [-E file] [-f file] [-h level] "
 #ifdef USE_QFA
                "] [-B records] [-b blocksize] [-d density]\n"
                "\t%s [-e inode#,inode#,...] [-E file] [-f file] [-h level] "
 #ifdef USE_QFA
index d1cdf1d711821d06572daae8b76b44afafe4ef61..cd98e6664d36ba963f6fbd41c6001fbcd88b5b71 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: optr.c,v 1.25 2001/07/18 09:12:05 stelian Exp $";
+       "$Id: optr.c,v 1.26 2001/08/16 09:37:59 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -106,6 +106,12 @@ query(const char *question)
        FILE    *mytty;
        time_t  firstprompt, when_answered;
 
        FILE    *mytty;
        time_t  firstprompt, when_answered;
 
+       if (qflag) {
+               msg("%s - forced abort\n", question);
+               dumpabort(0);
+               /* NOTREACHED */
+       }
+
        firstprompt = time(NULL);
 
        if ((mytty = fopen(_PATH_TTY, "r")) == NULL)
        firstprompt = time(NULL);
 
        if ((mytty = fopen(_PATH_TTY, "r")) == NULL)