mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-30 05:40:06 +00:00
2006-07-02 Matthias Andree <matthias.andree@gmx.de>
* fsck_ext2fs.8 (1.3): Reformat long lines. * fsck_ext2fs.8 (1.2): Add copyright notice and license. Change - to \- where appropriate. Add Id and FreeBSD keywords for ident. * fsck_ext2fs.c (1.6): Update license. * fsck_ext2fs.8 (1.1): Add a manual page. * fsck_ext2fs.c (1.5): When run with -F, do not report 'unknown option'. PR: 99712 Submitted by: Matthias Andree <matthias.andree at gmx.de>
This commit is contained in:
parent
4245abe9a3
commit
adcead7ff1
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=166925
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= e2fsprogs
|
||||
PORTVERSION= 1.39
|
||||
PORTREVISION?= 0
|
||||
PORTREVISION?= 1
|
||||
CATEGORIES?= sysutils
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
@ -41,7 +41,7 @@ MAN5= e2fsck.conf.5 mke2fs.conf.5
|
||||
MAN8= badblocks.8 debugfs.8 dumpe2fs.8 e2fsck.8 e2image.8 e2label.8 \
|
||||
mke2fs.8 mklost+found.8 resize2fs.8 tune2fs.8 \
|
||||
fsck.ext2.8 fsck.ext3.8 mkfs.ext2.8 mkfs.ext3.8 \
|
||||
findfs.8 blkid.8 logsave.8
|
||||
findfs.8 blkid.8 logsave.8 fsck_ext2fs.8
|
||||
|
||||
pre-build:
|
||||
@${ECHO_CMD} "-------------------------------------------------------------"
|
||||
@ -89,6 +89,7 @@ post-install:
|
||||
${RM} ${PREFIX}/man/man8/filefrag.8
|
||||
${RM} ${PREFIX}/info/libext2fs.info.gz
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${PREFIX}/sbin/
|
||||
${INSTALL_MAN} ${FILESDIR}/fsck_ext2fs.8 ${PREFIX}/man/man8/
|
||||
[ -f ${PREFIX}/etc/mke2fs.conf ] || \
|
||||
${CP} -p ${PREFIX}/etc/mke2fs.conf.dist ${PREFIX}/etc/mke2fs.conf
|
||||
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
96
sysutils/e2fsprogs/files/fsck_ext2fs.8
Normal file
96
sysutils/e2fsprogs/files/fsck_ext2fs.8
Normal file
@ -0,0 +1,96 @@
|
||||
.TH fsck_ext2fs 8 2006-07-02 "Matthias Andree" "FreeBSD Ports"
|
||||
.\"
|
||||
.\" fsck_ext2fs.8 - manual page for fsck_ext2fs wrapper
|
||||
.\"
|
||||
.\" (C) Copyright 2006 by Matthias Andree <matthias.andree@gmx.de>
|
||||
.\"
|
||||
.\" License: This file may be redistributed in accordance with the terms
|
||||
.\" of the GNU General Public License v2.
|
||||
.\"
|
||||
.\" Upstream $Id: fsck_ext2fs.8,v 1.3 2006/07/02 11:45:21 emma Exp $
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.SH NAME
|
||||
.B fsck_ext2fs
|
||||
\- compatibility wrapper for e2fsck
|
||||
.SH SYNOPSIS
|
||||
.P
|
||||
.B fsck_ext2fs
|
||||
[\fB\-Fpfnyv\fR] [\fB\-b\fR \fIblock\fR]
|
||||
.SH DESCRIPTION
|
||||
.P
|
||||
\fBfsck_ext2fs\fR maps the traditional FreeBSD \fBfsck_ffs\fR options to
|
||||
options with the same functionality for \fBe2fsck,\fR runs \fBe2fsck\fR
|
||||
and then maps its exit status to values that FreeBSD understands.
|
||||
\fBe2fsck\fR is a utility to check and repair ext2 and ext3 file
|
||||
systems.
|
||||
|
||||
.SH OPTIONS
|
||||
.IP \fB\-F\fR
|
||||
(check foreground mode required) Immediately exits with status 1 to tell
|
||||
\fBfsck\fR that ext2fs cannot be checked in the background. \fBfsck\fR
|
||||
usually runs \fBfsck_*\fR programs twice, first with \fB\-F\fR to find
|
||||
out if they can do background checking, then either immediately without
|
||||
\fB\-F\fR for foreground checking or deferred in the background with
|
||||
\fB\-B\fR.
|
||||
.IP \fB\-p\fR
|
||||
(preen mode) This option suppresses adding the \fB\-f\fR option (unless
|
||||
\fB\-f\fR is also given) and adds the \fB\-p\fR option to the
|
||||
\fBe2fsck\fR command line. This causes \fBe2fsck\fR to automatically fix
|
||||
any filesystem problems that can safely be fixed without operator
|
||||
intervention. Without this option given, \fBe2fsck\fR will be run with
|
||||
the \fB\-f\fR option to force a check, since interactive scan and repair
|
||||
mode is the default on FreeBSD, but not on Linux where \fBe2fsck\fR
|
||||
comes from.
|
||||
.IP \fB\-f\fR
|
||||
(force check) This option forces the check of a clean file system while
|
||||
preening and is passed to \fBe2fsck\fR verbatim.
|
||||
.IP \fB\-n\fR
|
||||
("no" mode) This option causes the file system to be opened in read-only
|
||||
mode and assume "no" as answer to all questions. This is the only way to
|
||||
safely run \fBfsck\fR on a mounted ext2 or ext3 file system. This option
|
||||
is passed to \fBe2fsck\fR verbatim.
|
||||
.IP \fB\-y\fR
|
||||
("yes" mode) This option is passed verbatim to \fBe2fsck\fR and causes
|
||||
it to assume "yes" as answer to all questions. This allows the
|
||||
non-interactive use of e2fsck but is rather aggressive. Use with care.
|
||||
.IP \fB\-v\fR
|
||||
(verbose output) This option is passed verbatim to \fBe2fsck\fR and
|
||||
causes it to verbosely report its progress.
|
||||
.IP "\fB\-b\fR \fIblock\fR"
|
||||
(use alternate super block) This option is passed verbatim to
|
||||
\fBe2fsck\fR and selects an alternate super block, for use when the
|
||||
primary super block has been damaged. Please see the \fBe2fsck\fR(8)
|
||||
manual page for details.
|
||||
|
||||
.SH EXIT STATUS
|
||||
If errors remain after \fBe2fsck\fR, an invalid option or too many
|
||||
options have been specified, \fBe2fsck\fR was killed with a signal or
|
||||
the \fIfork\fB system call failed, \fBfsck_ext2fs\fR exits with status
|
||||
EXIT_FAILURE (usually 1). If \fBe2fsck\fR cannot be started, exits with
|
||||
status 127. If the file system is clean after \fBe2fsck\fR operation,
|
||||
exits with status EXIT_SUCCESS (0).
|
||||
|
||||
.SH NOTES
|
||||
.P
|
||||
This utility is merely meant as an adaptor so that \fBe2fsck\fR can be
|
||||
run during the boot process, it does not support all options that
|
||||
\fBe2fsck\fR offers. If you need one of its advanced options, please run
|
||||
\fBe2fsck\fR directly.
|
||||
|
||||
.SH FILES
|
||||
.TP
|
||||
.I /sbin/e2fsck
|
||||
is the location of the \fBe2fsck\fR program to run.
|
||||
|
||||
.SH AUTHOR
|
||||
.P
|
||||
Matthias Andree <matthias.andree@gmx.de> wrote the program and this
|
||||
manual page.
|
||||
.SH CONFORMING TO
|
||||
The FreeBSD 6.1 command line interface for \fBfsck_ufs\fR(8).
|
||||
.SH SEE ALSO
|
||||
.BR fsck (8),
|
||||
.BR e2fsck (8)
|
||||
and
|
||||
.BR fsck_ufs (8).
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
* fsck_ext2fs - wrapper for e2fsck on FreeBSD
|
||||
* Copyright (C) 2004 Matthias Andree
|
||||
* Copyright (C) 2004,2006 Matthias Andree <matthias.andree@gmx.de>
|
||||
* redistributable in accordance with the
|
||||
* GNU General Public License v2
|
||||
*
|
||||
* $FreeBSD$
|
||||
*
|
||||
* Upstream: $Id: fsck_ext2fs.c,v 1.4 2004/03/20 15:51:01 emma Exp $
|
||||
* Upstream: $Id: fsck_ext2fs.c,v 1.6 2006/07/02 11:37:49 emma Exp $
|
||||
*
|
||||
* format: gindent -kr
|
||||
*/
|
||||
@ -57,8 +57,12 @@ int main(int argc, char **argv)
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'B':
|
||||
case 'F':
|
||||
/* e2fsck does not support background checking,
|
||||
* hence exit with nonzero status to force
|
||||
* the foreground check. */
|
||||
exit(1);
|
||||
case 'B':
|
||||
default:
|
||||
fprintf(stderr, "%s: unknown option -%c\n",
|
||||
argv[0], optopt);
|
||||
|
Loading…
Reference in New Issue
Block a user