Bug 85819 - [patch] script allowing multiuser mode in spite of fsck errors
Summary: [patch] script allowing multiuser mode in spite of fsck errors
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 5.4-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-07 02:40 UTC by Maurice Castro
Modified: 2017-12-31 22:37 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maurice Castro 2005-09-07 02:40:13 UTC

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"
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2006-06-29 01:26:52 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:26 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped