Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / security / stud / files / stud.sh
blob99a71b061f2ca8e6a41a801ce510766b5bf92606
1 #!@RCD_SCRIPTS_SHELL@
3 # $NetBSD$
6 # PROVIDE: stud
7 # REQUIRE: LOGIN
9 . /etc/rc.subr
11 name="stud"
12 rcvar=$name
13 command="@PREFIX@/bin/stud"
14 command_args="--config=@PKG_SYSCONFDIR@/stud.conf"
15 required_files="@PKG_SYSCONFDIR@/stud.conf"
16 required_dirs="$stud_chrootdir"
18 stud_chrootdir="@STUD_HOME@"
19 start_precmd="stud_precmd"
21 stud_precmd()
23 for i in null random urandom; do
24 if [ ! -c "${stud_chrootdir}/dev/$i" ]; then
25 rm -f "${stud_chrootdir}/dev/$i"
26 (cd /dev &&
27 /bin/pax -rw -pe "$i" "${stud_chrootdir}/dev")
29 done
32 load_rc_config $name
33 run_rc_command "$1"