FreeNAS Code
This project has moved to github - see https://github.com/freenas
Brought to you by:
cochard,
mattolander
#!/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"