sem_init.3: Mark up SEM_VALUE_MAX.
[dragonfly.git] / etc / rc.d / fixbootfile
blob864d05e595ebf2a5b7f9033bcd582c3c22331918
1 #!/bin/sh
3 # Fixup kern.bootfile. In a BOOT+ROOT setup the boot loader does not
4 # understand that the boot partition will be mounted as /boot under root
5 # in the actual system and sets up the kern.bootfile sysctl incorrectly.
6 # This fixes up kern.bootfile.
9 # PROVIDE: fixbootfile
10 # REQUIRE: mountcritlocal
11 # BEFORE: sysctl
13 . /etc/rc.subr
15 name="fixbootfile"
16 start_cmd="fixbootfile_start"
17 stop_cmd=":"
19 fixbootfile_start()
21 case ${fixbootfile} in
22 [Nn][Oo])
25 bootfile=`${SYSCTL_N} kern.bootfile`
26 if [ -f "/boot$bootfile" ]; then
27 ${SYSCTL_W} kern.bootfile="/boot$bootfile"
30 esac
33 load_rc_config $name
34 run_rc_command "$1"