Menu

[r10367]: / legacy / etc / rc.d / mountcritlocal  Maximize  Restore  History

Download this file

43 lines (32 with data), 777 Bytes

#!/bin/sh
# Copyright (c) 2007-2009 Volker Theile (votdev@gmx.de)
# All rights reserved.

# PROVIDE: mountcritlocal
# REQUIRE: root
# KEYWORD: nojail shutdown

. /etc/rc.subr
. /etc/configxml.subr

name="mountcritlocal"
start_cmd="mountcritlocal_start"
stop_cmd="mountcritlocal_stop"

mountcritlocal_start()
{
	local _result

	echo -n 'Mounting local file systems:'

	# Mount everything all configured filesystems
	eval /etc/rc.d.php/${name}
	_result=$?

	echo '.'

	return ${_result}
}

mountcritlocal_stop()
{
	/usr/local/bin/xml sel -t -m "//mounts/mount" \
		-v devicespecialfile -n \
		${configxml_file} | /usr/local/bin/xml unesc |
		while read _devicespecialfile; do
			/sbin/umount "${_devicespecialfile}" 2>/dev/null
		done
}

load_rc_config $name
run_rc_command "$1"
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.