Whamcloud - gitweb
Add man page documenting the /etc/e2fsck.conf configuration file.
authorTheodore Ts'o <tytso@mit.edu>
Mon, 27 Mar 2006 06:03:11 +0000 (01:03 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 27 Mar 2006 06:03:11 +0000 (01:03 -0500)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/ChangeLog
e2fsck/Makefile.in
e2fsck/e2fsck.conf.5.in [new file with mode: 0644]

index 1421d36..7b7dfed 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-27  Theodore Ts'o  <tytso@mit.edu>
+
+       * Makefile.in, e2fsck.conf.5.in: Add man page documenting the
+               configuration file /etc/e2fsck.conf.
+
 2006-03-22  Theodore Ts'o  <tytso@mit.edu>
 
        * profile.c (profile_update_file, profile_parse_file, parse_line,
index b26debd..f0b1803 100644 (file)
@@ -14,6 +14,7 @@ LDFLAG_STATIC = @LDFLAG_STATIC@
 
 PROGS=         e2fsck
 MANPAGES=      e2fsck.8
+FMANPAGES=     e2fsck.conf.5
 XTRA_CFLAGS=   -DRESOURCE_TRACK -I.
 
 LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBBLKID) $(LIBUUID) $(LIBINTL)
@@ -103,7 +104,7 @@ SRCS= $(srcdir)/e2fsck.c \
        prof_err.c \
        $(MTRACE_SRC)
 
-all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES)
+all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES) $(FMANPAGES)
 
 @PROFILE_CMT@all:: e2fsck.profiled
 
@@ -166,10 +167,14 @@ e2fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.8.in
        @echo " SUBST $@"
        @$(SUBSTITUTE_UPTIME) $(srcdir)/e2fsck.8.in e2fsck.8
 
+e2fsck.conf.5: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.conf.5.in
+       @echo " SUBST $@"
+       @$(SUBSTITUTE_UPTIME) $(srcdir)/e2fsck.conf.5.in e2fsck.conf.5
+
 installdirs:
        @echo " MKINSTALLDIRS $(root_sbindir) $(man8dir)"
        @$(MKINSTALLDIRS) $(DESTDIR)$(root_sbindir) \
-               $(DESTDIR)$(man8dir)
+               $(DESTDIR)$(man8dir) $(DESTDIR)$(man5dir)
 
 install: $(PROGS) $(MANPAGES) installdirs
        @for i in $(PROGS); do \
@@ -189,6 +194,13 @@ install: $(PROGS) $(MANPAGES) installdirs
                echo "  INSTALL_DATA $(man8dir)/$$i"; \
                $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
        done
+       @for i in $(FMANPAGES); do \
+               for j in $(COMPRESS_EXT); do \
+                       $(RM) -f $(DESTDIR)$(man5dir)/$$i.$$j; \
+               done; \
+               echo "  INSTALL_DATA $(man5dir)/$$i"; \
+               $(INSTALL_DATA) $$i $(DESTDIR)$(man5dir)/$$i; \
+       done
        @echo " LINK $(man8dir)/fsck.ext2.8"
        @$(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 \
                $(DESTDIR)$(man8dir)/fsck.ext2.8
@@ -211,6 +223,9 @@ uninstall:
        for i in $(MANPAGES); do \
                $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
        done
+       for i in $(FMANPAGES); do \
+               $(RM) -f $(DESTDIR)$(man5dir)/$$i; \
+       done
        $(RM) -f $(DESTDIR)$(root_sbindir)/fsck.ext2 \
                        $(DESTDIR)$(root_sbindir)/fsck.ext3
 
diff --git a/e2fsck/e2fsck.conf.5.in b/e2fsck/e2fsck.conf.5.in
new file mode 100644 (file)
index 0000000..556a41a
--- /dev/null
@@ -0,0 +1,164 @@
+.\" -*- nroff -*-
+.\" Copyright 2006 by Theodore Ts'o.  All Rights Reserved.
+.\" This file may be copied under the terms of the GNU Public License.
+.\" 
+.TH e2fsck.conf 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
+.SH NAME
+e2fsck.conf \- Configuration file for e2fsck
+.SH DESCRIPTION
+.I e2fsck.conf
+is the configuration file for 
+.BR e2fsck (8).  
+It controls the default parameters used by 
+.BR e2fsck (8)
+when it is creating ext2 or ext3 filesystems.
+.PP
+The
+.I e2fsck.conf
+file uses an INI-style format.  Stanzas, or top-level sections, are 
+delimited by square braces: [ ].  Within each section, each line 
+defines a relation, which assigns tags to values, or to a subsection,
+which contains further relations or subsections.   
+.\" Tags can be assigned multiple values
+An example of the INI-style format used by this configuration file 
+follows below:
+.P
+       [section1]
+.br
+               tag1 = value_a
+.br
+               tag1 = value_b
+.br
+               tag2 = value_c
+.P
+       [section 2]
+.br
+               tag3 = {
+.br
+                       subtag1 = subtag_value_a
+.br
+                       subtag1 = subtag_value_b
+.br
+                       subtag2 = subtag_value_c
+.br
+               }
+.br
+               tag1 = value_d
+.br
+               tag2 = value_e
+.br
+       }
+.P
+Comments are delimited by a semicolon (';') or a hash ('#') character 
+at the beginning of the comment, and are terminated by the end of 
+line character.
+.P
+Tags and values must be quoted using double quotes if they contain
+spaces.  Within a quoted string, the standard backslash interpretations 
+apply: "\en" (for the newline character), 
+"\et" (for the tab character), "\eb" (for the backspace character), 
+and "\e\e" (for the backslash character).
+.P
+The following stanzas are used in the 
+.I e2fsck.conf
+file.  They will be described in more detail in future sections of this
+document.
+.TP 
+.I [options]
+This stanza contains general configuration parameters for 
+.BR e2fsck 's
+behavior.
+.I [problems]
+This stanza allows the administrator to reconfigure how e2fsck handles
+various filesystem inconsistencies.
+.SH THE [options] STANZA
+The following relations are defined in the 
+.I [options]
+stanza.
+.TP
+.I allow_cancellation
+If this relation is set to a boolean value of true, then if the user 
+interrupts e2fsck using ^C, and the filesystem is not explicitly flagged
+as containing errors, e2fsck will exit with an exit status of 0 instead
+of 32.  This setting defaults to false.
+.TP 
+.I defer_check_on_battery
+This boolean relation controls whether or not the interval between 
+filesystem checks (either based on time or number of mounts) should 
+be doubled if the system is running on battery.  It defaults to 
+true.
+.SH THE [problems] STANZA
+Each tag in the
+.I [problems] 
+stanza names a problem code specified with a leading "0x" followed by
+six hex digits.   
+The value of the tag is a subsection where the relations in that
+subsection override the default treatment of that particular problem 
+code.
+.P
+Note that inappropriate settings in this stanza may cause 
+.B e2fsck
+to behave incorrectly, or even crash.  Most system administrators should
+not be making changes to this section without referring to source code.
+.P
+Within each problem code's subsection, the following tags may be used:
+.TP
+.I description
+This relation allows the message which is printed when this filesystem
+inconsistency is detected to be overridden.
+.TP
+.I preen_ok
+This boolean relation overrides the default behavior controlling 
+whether this filesystem problem should be automatically fixed when
+.B e2fsck
+is running in preen mode.
+.TP
+.I no_ok
+This boolean relation overrides the default behavior determining
+whether or not the filesystem will be marked as inconsistent if the user
+declines to fix the reported problem.
+.TP
+.I no_default
+This boolean relation overrides whether the default answer for this 
+problem (or question) should be "no".
+.TP 
+.I preen_nomessage
+This boolean relation overrides the default behavior controlling 
+whether or not the description for this filesystem problem should
+be suppressed when
+.B e2fsck
+is running in preen mode.
+.TP
+.I no_nomsg
+This boolean relation overrides the default behavior controlling 
+whether or not the description for this filesystem problem should
+be suppressed when
+.B e2fsck
+is run with the
+.B -n
+option.
+.SH EXAMPLES
+The following recipe will prevent e2fsck from aborting during the boot
+process when a filesystem contains orphaned files.  (Of course, this is
+not always a good idea, since critical files that are needed for the
+security of the system could potentially end up in lost+found, and
+starting the system without first having a system administrator check
+things out may be dangerous.)
+.P
+.br
+       [problems]
+.br
+               0x040002 = {
+.br
+                       preen_ok = true
+.br
+                       description = "@u @i %i.  "
+.br
+               }
+.SH FILES
+.TP
+.I /etc/e2fsck.conf
+The configuration file for 
+.BR e2fsck (8).
+.SH SEE ALSO
+.BR e2fsck (8)