From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 7 01:40:25 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org 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 45AED16A421 for ; Wed, 7 Sep 2005 01:40:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E3D943D75 for ; Wed, 7 Sep 2005 01:40:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j871eEp8098518 for ; Wed, 7 Sep 2005 01:40:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j871eEnD098517; Wed, 7 Sep 2005 01:40:14 GMT (envelope-from gnats) Resent-Date: Wed, 7 Sep 2005 01:40:14 GMT Resent-Message-Id: <200509070140.j871eEnD098517@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, Maurice Castro Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 603D716A41F for ; Wed, 7 Sep 2005 01:38:35 +0000 (GMT) (envelope-from maurice@sphinx.clari.net.au) Received: from sphinx.clari.net.au (sphinx.clari.net.au [203.8.14.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8825A43D45 for ; Wed, 7 Sep 2005 01:38:34 +0000 (GMT) (envelope-from maurice@sphinx.clari.net.au) Received: from sphinx.clari.net.au (localhost.clari.net.au [127.0.0.1]) by sphinx.clari.net.au (8.13.3/8.13.3) with ESMTP id j871cWcj069730 for ; Wed, 7 Sep 2005 11:38:32 +1000 (EST) (envelope-from maurice@sphinx.clari.net.au) Received: (from root@localhost) by sphinx.clari.net.au (8.13.3/8.13.3/Submit) id j871cWA8069729; Wed, 7 Sep 2005 11:38:32 +1000 (EST) (envelope-from maurice) Message-Id: <200509070138.j871cWA8069729@sphinx.clari.net.au> Date: Wed, 7 Sep 2005 11:38:32 +1000 (EST) From: Maurice Castro To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: conf/85819: Script allowing multiuser mode in spite of fsck errors X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maurice Castro List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2005 01:40:25 -0000 >Number: 85819 >Category: conf >Synopsis: Script allowing multiuser mode in spite of fsck errors >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Sep 07 01:40:13 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Maurice Castro >Release: FreeBSD 5.4-RELEASE i386 >Organization: Clarinet Internet Solutions >Environment: System: FreeBSD sphinx.clari.net.au 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Mon Aug 15 14:39:49 EST 2005 maurice@sphinx.clari.net.au:/work/src/sys/i386/compile/sphinx i386 >Description: >How-To-Repeat: >Fix: #!/bin/sh # # PROVIDE: mountdeflocal # REQUIRE: root mountcritlocal # BEFORE: var tmp # KEYWORD: nojail . /etc/rc.subr name="mountdeflocal" stop_cmd=":" start_cmd="mountdeflocal_start" # Author: Maurice Castro # Date: Mon Jul 25 09:16:28 EST 2005 # This script is used to get a machine into multiuser mode inspite of failed # fscks. This script is useful for remote machines with only ethernet # connectivity # # How to use: # # To use this script make / and /usr readonly. Make all the other # filesystems noauto and no fsck in the the fstab file and add them to the # deferred_mount variable in /etc/rc.conf. A trap for young players is that # some ilbehaved programs need to write into /usr/local; so separating it # from /usr is a good idea. # # What it does: # # fsck each of the local disks that are to be deferred mounted if any of the # fail then don't mount any of them if they all succeed mount the lot mountdeflocal_start() { # Mount nfs filesystems. # echo -n 'Fsck local deferred mount file systems:' for i in $deferred_mount do /sbin/fsck -p $i if [ $? != 0 ] then exit 0 fi done echo '.' echo -n 'Mount local deferred mount file systems:' for i in $deferred_mount do /sbin/mount $i done echo '.' } load_rc_config $name run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: