summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc.d/Makefile2
-rw-r--r--etc/rc.d/apm30
-rwxr-xr-xetc/rc.d/apmd25
-rw-r--r--etc/rc.d/kerberos4
4 files changed, 56 insertions, 5 deletions
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index 13573a0..42bc3f0 100755
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -4,7 +4,7 @@
.include <bsd.own.mk>
FILES= DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz altqd \
- amd apmd atm1 atm2.sh atm3.sh bgfsck bootconf.sh bootparams ccd \
+ amd apm apmd atm1 atm2.sh atm3.sh bgfsck bootconf.sh bootparams ccd \
cleanvar cleartmp cron devdb devfs dhclient dhcpd dhcrelay diskless \
dmesg dumpon fsck gated inetd initdiskless initrandom ipfilter ipfw \
ip6fw ipmon ipnat ipsec ipxrouted isdnd kadmind kdc kerberos keyserv \
diff --git a/etc/rc.d/apm b/etc/rc.d/apm
new file mode 100644
index 0000000..d88f7c0
--- /dev/null
+++ b/etc/rc.d/apm
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: apm
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD
+
+. /etc/rc.subr
+
+name="apm"
+rcvar=`set_rcvar`
+start_precmd="apm_precmd"
+command="/usr/sbin/${name}"
+command_args="-e enable"
+
+apm_precmd()
+{
+ case `${SYSCTL_N} hw.machine_arch` in
+ i386)
+ return 0
+ ;;
+ esac
+ return 1
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/etc/rc.d/apmd b/etc/rc.d/apmd
index 13f9268..7583ed4 100755
--- a/etc/rc.d/apmd
+++ b/etc/rc.d/apmd
@@ -5,14 +5,35 @@
#
# PROVIDE: apmd
-# REQUIRE: DAEMON
+# REQUIRE: DAEMON apm
# BEFORE: LOGIN
+# KEYWORD: FreeBSD NetBSD
. /etc/rc.subr
name="apmd"
-rcvar=$name
+rcvar=`set_rcvar`
command="/usr/sbin/${name}"
+case `${CMD_OSTYPE}` in
+FreeBSD)
+ start_precmd="apmd_prestart"
+ ;;
+esac
+
+apmd_prestart()
+{
+ case `${SYSCTL_N} hw.machine_arch` in
+ i386)
+ # Don't start if apm is already running
+ /etc/rc.d/apm forcestatus > /dev/null && return 1
+ ;;
+ *)
+ return 1
+ ;;
+ esac
+ return 0
+}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/etc/rc.d/kerberos b/etc/rc.d/kerberos
index 5dfec95..fbd45ba 100644
--- a/etc/rc.d/kerberos
+++ b/etc/rc.d/kerberos
@@ -10,18 +10,18 @@
. /etc/rc.subr
name="kerberosIV"
+load_rc_config $name
rcvar="kerberos4_server_enable"
command="${kerberos4_server}"
checkyesno kerberos_stash && stash='-n' || stash=
command_args="${stash} >> /var/log/kerberos.log &"
-load_rc_config $name
run_rc_command "$1"
name="kerberos5"
+load_rc_config $name
rcvar="kerberos5_server_enable"
command="${kerberos5_server}"
command_args="&"
-load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud