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