#!/bin/sh
# /site/usr/local/bin/fsck.sh
# Source:			http://www.berklix.com/~jhs/bin/.sh/fsck.sh
# Manually Installed to:	/site/usr/local/bin/fsck.sh
# Called by:			/site/etc/devd/berklix.conf

# Purpose: to select (on a per host basis) fast mounts or checked mounts,
# Without needing to temporarily edit in /site/etc/devd/berklix.conf
# swapping lots of fsck to echo

# Comment out 1 of the 2 line below.
# normaly, for safety use this:
#	echo fsck
#	# echo echo
# If you know the sticks dont need checking, for a fast mount use this:
#	# echo fsck
#	echo echo

# Set a default action
fsck_usb=fsck
# fsck_usb=echo 

# Allow over ride, read in fsck_usb
. /etc/rc.conf

case $domain in #{
	js.berklix.net) 		#{ Used to be my home domain
		fsck_usb="fsck -y"	# Full slow check, eg at home
		;;			#}
	no.berklix.net) 		#{ Used to be my traveling domain,
					# but now also my new home domain
					# may change later
		# fsck_usb="fsck -p"	# Fast partial check, eg on the road
		fsck_usb="fsck -y"	# Full slow check, eg at home
		# Even while travelling, if I have accidentaly
		# unplugged power I may want to force a rigorous check on
		# all external media for the next while.
		;;			#}
	*)				#{ Default
		fsck_usb=fsck
		;;			#}
	esac	# }
