Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst If a valid file system type is found f...
details: https://anonhg.NetBSD.org/src/rev/2fac46e54e3f
branches: trunk
changeset: 533428:2fac46e54e3f
user: scottr <scottr%NetBSD.org@localhost>
date: Sun Jun 30 04:02:47 2002 +0000
description:
If a valid file system type is found for a particular partition but no
mount point was specified, make sure to add only a commented-out entry for
that partition when building fstab. This prevents sysinst from generating
an otherwise invalid fstab. This problem was originally reported by
Frederick Bruckman and fixed by Bob Nestor.
diffstat:
distrib/utils/sysinst/disks.c | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
diffs (48 lines):
diff -r de104a4285f0 -r 2fac46e54e3f distrib/utils/sysinst/disks.c
--- a/distrib/utils/sysinst/disks.c Sun Jun 30 03:57:46 2002 +0000
+++ b/distrib/utils/sysinst/disks.c Sun Jun 30 04:02:47 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.44 2002/06/30 03:57:46 scottr Exp $ */
+/* $NetBSD: disks.c,v 1.45 2002/06/30 04:02:47 scottr Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -319,23 +319,31 @@
#endif
}
for (i = 0; i < getmaxpartitions(); i++)
- if (bsdlabel[i].pi_fstype == FS_BSDFFS)
- scripting_fprintf(f, "/dev/%s%c %s ffs rw 1 %d\n",
+ if (bsdlabel[i].pi_fstype == FS_BSDFFS) {
+ char *s = "#";
+
+ if (*fsmount[i] != '\0')
+ s++;
+ scripting_fprintf(f, "%s/dev/%s%c %s ffs rw 1 %d\n", s,
diskdev, 'a'+i, fsmount[i],
fsck_num(fsmount[i]));
- else if (bsdlabel[i].pi_fstype == FS_BSDLFS) {
+ } else if (bsdlabel[i].pi_fstype == FS_BSDLFS) {
char *s = "#";
/* If there is no LFS, just comment it out. */
- if (!check_lfs_progs())
+ if (!check_lfs_progs() && *fsmount[i] != '\0')
s++;
scripting_fprintf(f, "%s/dev/%s%c %s lfs rw 1 %d\n", s,
diskdev, 'a'+i, fsmount[i],
fsck_num(fsmount[i]));
- } else if (bsdlabel[i].pi_fstype == FS_MSDOS)
- scripting_fprintf(f, "/dev/%s%c %s msdos rw 0 0\n",
+ } else if (bsdlabel[i].pi_fstype == FS_MSDOS) {
+ char *s = "#";
+
+ if (*fsmount[i] != '\0')
+ s++;
+ scripting_fprintf(f, "%s/dev/%s%c %s msdos rw 0 0\n", s,
diskdev, 'a'+i, fsmount[i]);
- else if (bsdlabel[i].pi_fstype == FS_SWAP) {
+ } else if (bsdlabel[i].pi_fstype == FS_SWAP) {
if (swapdev == -1)
swapdev = i;
scripting_fprintf(f, "/dev/%s%c none swap sw 0 0\n", diskdev, 'a'+i);
Home |
Main Index |
Thread Index |
Old Index