This script should probably have an enabling variable since it can produce
surprising results. For now, at least make it safe to boot the default kernel when /boot/kernel is already a symlink.
This commit is contained in:
parent
1b405ff747
commit
55fd436b5f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160835
@ -16,8 +16,10 @@ stop_cmd=":"
|
||||
kernel_start()
|
||||
{
|
||||
bootdir=$(dirname $(sysctl -n kern.bootfile))
|
||||
if [ ! -e /boot/kernel -o -h /boot/kernel ] ; then
|
||||
ln -hfs ${bootdir} /boot/kernel
|
||||
if [ "$bootdir" != /boot/kernel ] ; then
|
||||
if [ ! -e /boot/kernel -o -h /boot/kernel ] ; then
|
||||
ln -hfs ${bootdir} /boot/kernel
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user