xref: /dragonfly/etc/rc.d/resident (revision 35e996c9)
1#!/bin/sh
2
3# PROVIDE: resident
4# REQUIRE: mountcritremote
5
6. /etc/rc.subr
7
8name=resident
9rcvar='resident_enable'
10required_files="/etc/resident.conf"
11start_cmd="resident_start"
12stop_cmd=":"
13
14resident_start()
15{
16	if [ ! -f /etc/resident.conf ]; then
17		return
18	fi
19
20	while read path; do
21		case ${path} in
22		\#*|"")
23			;;
24		*)
25			if [ -f ${path} ]; then
26				resident ${path}
27			else
28				file ${path} | grep shared | \
29				    cut -f1 -d ':' -s | xargs resident
30			fi
31			;;
32		esac
33	done < /etc/resident.conf
34}
35
36load_rc_config $name
37run_rc_command "$1"
38