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