29 lines
457 B
Bash
Executable File
29 lines
457 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: kernel_symlink
|
|
# REQUIRE: mountcritremote
|
|
# KEYWORD: nojail
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="kernel_symlink"
|
|
rcvar=`set_rcvar`
|
|
start_cmd="kernel_symlink_start"
|
|
stop_cmd=":"
|
|
|
|
kernel_symlink_start()
|
|
{
|
|
bootdir=$(dirname $(sysctl -n kern.bootfile))
|
|
if [ "$bootdir" != /boot/kernel ] ; then
|
|
if [ ! -e /boot/kernel -o -h /boot/kernel ] ; then
|
|
ln -hfs ${bootdir} /boot/kernel
|
|
fi
|
|
fi
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|