summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc.d/Makefile2
-rw-r--r--etc/rc.d/kernel25
2 files changed, 26 insertions, 1 deletions
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index 096dc0f..3743975 100755
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -18,7 +18,7 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \
ip6addrctl ip6fw ipfilter ipfs ipfw ipmon \
ipnat ipsec ipxrouted isdnd \
jail \
- kadmind kerberos keyserv kldxref kpasswdd \
+ kadmind kerberos kernel keyserv kldxref kpasswdd \
ldconfig local localpkg lpd \
mixer motd mountcritlocal mountcritremote \
mountd moused mroute6d mrouted msgs \
diff --git a/etc/rc.d/kernel b/etc/rc.d/kernel
new file mode 100644
index 0000000..ed9e02e
--- /dev/null
+++ b/etc/rc.d/kernel
@@ -0,0 +1,25 @@
+#!/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))
+ if [ ! -e /boot/kernel -o -h /boot/kernel ] ; then
+ ln -hfs ${bootdir} /boot/kernel
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
OpenPOWER on IntegriCloud