2006-03-17 16:28:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: kernel
|
|
|
|
# REQUIRE: mountcritremote
|
|
|
|
# KEYWORD: nojail
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="kernel"
|
|
|
|
start_cmd="kernel_start"
|
|
|
|
stop_cmd=":"
|
|
|
|
|
|
|
|
kernel_start()
|
|
|
|
{
|
|
|
|
bootdir=$(dirname $(sysctl -n kern.bootfile))
|
2006-07-30 12:54:37 +00:00
|
|
|
if [ "$bootdir" != /boot/kernel ] ; then
|
|
|
|
if [ ! -e /boot/kernel -o -h /boot/kernel ] ; then
|
|
|
|
ln -hfs ${bootdir} /boot/kernel
|
|
|
|
fi
|
2006-03-17 16:28:12 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|