From owner-freebsd-bugs@FreeBSD.ORG Sun Jun 15 02:30:13 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EE1E37B401 for ; Sun, 15 Jun 2003 02:30:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46DB943FBD for ; Sun, 15 Jun 2003 02:30:12 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h5F9UCUp042793 for ; Sun, 15 Jun 2003 02:30:12 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h5F9UCcR042792; Sun, 15 Jun 2003 02:30:12 -0700 (PDT) Resent-Date: Sun, 15 Jun 2003 02:30:12 -0700 (PDT) Resent-Message-Id: <200306150930.h5F9UCcR042792@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Udo Erdelhoff Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91EAD37B401 for ; Sun, 15 Jun 2003 02:20:26 -0700 (PDT) Received: from mail.ruhr.de (in-ruhr4.ruhr.de [212.23.134.2]) by mx1.FreeBSD.org (Postfix) with SMTP id 17DBD43FBD for ; Sun, 15 Jun 2003 02:20:24 -0700 (PDT) (envelope-from ue@nathan.ruhr.de) Received: (qmail 20878 invoked by uid 10); 15 Jun 2003 09:20:21 -0000 Received: from nathan.internal (localhost.internal [127.0.0.1]) by nathan.internal (8.12.9/8.12.9) with ESMTP id h5F9BXPI082211 for ; Sun, 15 Jun 2003 11:11:33 +0200 (CEST) (envelope-from ue@nathan.internal) Received: (from ue@localhost) by nathan.internal (8.12.9/8.12.9/Submit) id h5F9BXYh082210; Sun, 15 Jun 2003 11:11:33 +0200 (CEST) Message-Id: <200306150911.h5F9BXYh082210@nathan.internal> Date: Sun, 15 Jun 2003 11:11:33 +0200 (CEST) From: Udo Erdelhoff To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/53341: dump frequency in sysinstall is always the fsck sequence number X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Udo Erdelhoff List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2003 09:30:13 -0000 >Number: 53341 >Category: bin >Synopsis: dump frequency in sysinstall is always the fsck sequence number >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jun 15 02:30:11 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Udo Erdelhoff >Release: FreeBSD 5.1-BETA i386 >Organization: >Environment: System: FreeBSD nathan.internal 5.1-BETA FreeBSD 5.1-BETA #0: Mon May 19 06:45:58 CEST 2003 root@nathan.internal:/home/data/obj/home/data/src/sys/NATHAN i386 >Description: The dump frequency and fsck pass columns in the /etc/fstab of a freshly installed FreeBSD system will always be identical because the code in sysinstall/config.c hardcodes that. This make the periodic "dump these file systems" report rather useless, because it insists on dumping the root fs every day and every other file system every two days. >How-To-Repeat: Install a FreeBSD system for the first time and look into /etc/fstab >Fix: WARNING: Untested. It compiles, but that is about it. The numbers I choose (7 days for /home, 28 days for static stuff) are what I use on my boxes, they are perfect bikeshed material. Index: config.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/sysinstall/config.c,v retrieving revision 1.210 diff -u -r1.210 config.c --- config.c 31 May 2003 11:28:28 -0000 1.210 +++ config.c 15 Jun 2003 08:56:52 -0000 @@ -172,6 +172,21 @@ return 0; } +static int +dump_freq(Chunk *c1) +{ + if (c1->type == part && c1->subtype != FS_SWAP) { + if (rootdev_is_od == 0 && strncmp(c1->name, "od", 2) == 0) + return 0; + else if (strncmp(mount_point(c1), "/home", 5) == 0) + return 7; + else + return 28; + } + return 0; +} + + int configFstab(dialogMenuItem *self) { @@ -233,7 +248,7 @@ fprintf(fstab, "# Device\t\tMountpoint\tFStype\tOptions\t\tDump\tPass#\n"); for (i = 0; i < nchunks; i++) fprintf(fstab, "/dev/%s\t\t%s\t\t%s\t%s\t\t%d\t%d\n", name_of(chunk_list[i]), mount_point(chunk_list[i]), - fstype(chunk_list[i]), fstype_short(chunk_list[i]), seq_num(chunk_list[i]), seq_num(chunk_list[i])); + fstype(chunk_list[i]), fstype_short(chunk_list[i]), dump_freq(chunk_list[i]), seq_num(chunk_list[i])); /* Now look for the CDROMs */ devs = deviceFind(NULL, DEVICE_TYPE_CDROM); >Release-Note: >Audit-Trail: >Unformatted: