Merge branch 'vendor/MDOCML'
[dragonfly.git] / etc / rc.d / resident
1 #!/bin/sh
2
3 # $DragonFly: src/etc/rc.d/resident,v 1.4 2007/08/08 03:11:00 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 | \
30                                             cut -f1 -d ':' -s | xargs resident
31                                 fi
32                                 ;;
33                         esac
34                 done < /etc/resident.conf
35         fi
36 }
37
38 load_rc_config $name
39 run_rc_command "$1"