aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2012-02-17 00:27:48 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2012-02-17 00:27:48 +0000
commit9dba179d5e2453efa8e67ee2df13ee86d46ad0d4 (patch)
tree179b25709440fd93c2411bdc340ec3abd53ab5bf /etc
parent1b46c7f83201c70bc284b319a970764d3811e63f (diff)
parenta228e013c3eb1777e8a925bda035261a56437ab5 (diff)
downloadsrc-9dba179d5e2453efa8e67ee2df13ee86d46ad0d4.tar.gz
src-9dba179d5e2453efa8e67ee2df13ee86d46ad0d4.zip
IFC @231845
Sponsored by: Cisco Systems, Inc.
Notes
Notes: svn path=/projects/multi-fibv6/head/; revision=231846
Diffstat (limited to 'etc')
-rw-r--r--etc/Makefile54
-rw-r--r--etc/defaults/periodic.conf1
-rw-r--r--etc/defaults/rc.conf3
-rw-r--r--etc/devd/usb.conf21
-rwxr-xr-xetc/periodic/daily/404.status-zfs17
-rwxr-xr-xetc/rc.d/LOGIN2
-rw-r--r--etc/rc.d/Makefile5
-rwxr-xr-xetc/rc.d/SERVERS2
-rwxr-xr-xetc/rc.d/addswap2
-rwxr-xr-xetc/rc.d/amd12
-rwxr-xr-xetc/rc.d/apmd10
-rwxr-xr-xetc/rc.d/cleanvar2
-rwxr-xr-xetc/rc.d/devfs3
-rwxr-xr-xetc/rc.d/keyserv8
-rwxr-xr-xetc/rc.d/lockd18
-rwxr-xr-xetc/rc.d/mountd10
-rwxr-xr-xetc/rc.d/nfsd22
-rwxr-xr-xetc/rc.d/routing6
-rwxr-xr-xetc/rc.d/statd17
-rwxr-xr-xetc/rc.d/utx17
-rwxr-xr-xetc/rc.d/var2
-rwxr-xr-xetc/rc.d/watchdogd2
-rwxr-xr-xetc/rc.d/ypbind14
-rwxr-xr-xetc/rc.d/yppasswdd21
-rwxr-xr-xetc/rc.d/ypserv13
-rwxr-xr-xetc/rc.d/ypset19
-rwxr-xr-xetc/rc.d/ypupdated16
-rwxr-xr-xetc/rc.d/ypxfrd19
-rwxr-xr-xetc/rc.resume6
-rw-r--r--etc/rc.subr15
-rwxr-xr-xetc/rc.suspend12
31 files changed, 173 insertions, 198 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 42d695939d2d..0df9ec7affb8 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -7,18 +7,48 @@
SUBDIR= sendmail
.endif
-BIN1= auth.conf \
- crontab devd.conf devfs.conf \
- ddb.conf dhclient.conf disktab fbtab \
- ftpusers gettytab group \
- hosts hosts.allow hosts.equiv \
- inetd.conf libalias.conf login.access login.conf mac.conf motd \
- netconfig network.subr networks newsyslog.conf nsswitch.conf \
- phones profile protocols \
- rc rc.bsdextended rc.firewall rc.initdiskless \
- rc.sendmail rc.shutdown \
- rc.subr remote rpc services shells \
- sysctl.conf syslog.conf termcap.small
+BIN1= auth.conf
+BIN1+= crontab
+BIN1+= devd.conf
+BIN1+= devfs.conf
+BIN1+= ddb.conf
+BIN1+= dhclient.conf
+BIN1+= disktab
+BIN1+= fbtab
+BIN1+= ftpusers
+BIN1+= gettytab
+BIN1+= group
+BIN1+= hosts
+BIN1+= hosts.allow
+BIN1+= hosts.equiv
+BIN1+= inetd.conf
+BIN1+= libalias.conf
+BIN1+= login.access
+BIN1+= login.conf
+BIN1+= mac.conf
+BIN1+= motd
+BIN1+= netconfig
+BIN1+= network.subr
+BIN1+= networks
+BIN1+= newsyslog.conf
+BIN1+= nsswitch.conf
+BIN1+= phones
+BIN1+= profile
+BIN1+= protocols
+BIN1+= rc
+BIN1+= rc.bsdextended
+BIN1+= rc.firewall
+BIN1+= rc.initdiskless
+BIN1+= rc.sendmail
+BIN1+= rc.shutdown
+BIN1+= rc.subr
+BIN1+= remote
+BIN1+= rpc
+BIN1+= services
+BIN1+= shells
+BIN1+= sysctl.conf
+BIN1+= syslog.conf
+BIN1+= termcap.small
.if exists(${.CURDIR}/etc.${MACHINE}/ttys)
BIN1+= etc.${MACHINE}/ttys
diff --git a/etc/defaults/periodic.conf b/etc/defaults/periodic.conf
index 27192bc039e3..66fbcd37322f 100644
--- a/etc/defaults/periodic.conf
+++ b/etc/defaults/periodic.conf
@@ -96,6 +96,7 @@ daily_status_disks_df_flags="-l -h" # df(1) flags for check
# 404.status-zfs
daily_status_zfs_enable="NO" # Check ZFS
+daily_status_zfs_zpool_list_enable="YES" # List ZFS pools
# 405.status-ata_raid
daily_status_ata_raid_enable="NO" # Check ATA raid status
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index b9e78ce0f11a..906151be115a 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -29,6 +29,8 @@ early_late_divider="FILESYSTEMS" # Script that separates early/late
# stages of the boot process. Make sure you know
# the ramifications if you change this.
# See rc.conf(5) for more details.
+always_force_depends="NO" # Set to check that indicated dependencies are
+ # running during boot (can increase boot time).
swapfile="NO" # Set to name of swapfile if aux swapfile desired.
apm_enable="NO" # Set to YES to enable APM BIOS functions (or NO).
@@ -648,6 +650,7 @@ devfs_rulesets="/etc/defaults/devfs.rules /etc/devfs.rules" # Files containing
devfs_system_ruleset="" # The name (NOT number) of a ruleset to apply to /dev
devfs_set_rulesets="" # A list of /mount/dev=ruleset_name settings to
# apply (must be mounted already, i.e. fstab(5))
+devfs_load_rulesets="NO" # Enable to always load the default rulesets
performance_cx_lowest="HIGH" # Online CPU idle state
performance_cpu_freq="NONE" # Online CPU frequency
economy_cx_lowest="HIGH" # Offline CPU idle state
diff --git a/etc/devd/usb.conf b/etc/devd/usb.conf
index 22cb7ad0b3dd..e44f348e356f 100644
--- a/etc/devd/usb.conf
+++ b/etc/devd/usb.conf
@@ -157,7 +157,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x0403";
- match "product" "(0x6001|0x6004|0x6010|0x6011|0x8372|0x9e90|0xcc48|0xcc49|0xcc4a|0xd678|0xe6c8|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xee18|0xf608|0xf60b|0xf850|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfc08|0xfc09|0xfc0b|0xfc0c|0xfc0d|0xfc82)";
+ match "product" "(0x6001|0x6004|0x6010|0x6011|0x8372|0x9e90|0xa6d0|0xa6d0|0xcc48|0xcc49|0xcc4a|0xd678|0xe6c8|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xee18|0xf608|0xf60b|0xf850|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfc08|0xfc09|0xfc0b|0xfc0c|0xfc0d|0xfc82)";
action "kldload uftdi";
};
@@ -293,7 +293,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x0411";
- match "product" "(0x0148|0x0150|0x015d|0x016f)";
+ match "product" "(0x0148|0x0150|0x015d|0x016f|0x01a2)";
action "kldload if_run";
};
@@ -1021,7 +1021,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x05c6";
- match "product" "(0x6000|0x6613)";
+ match "product" "(0x1000|0x6000|0x6613)";
action "kldload u3g";
};
@@ -1301,7 +1301,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x0789";
- match "product" "(0x0162|0x0163|0x0164)";
+ match "product" "(0x0162|0x0163|0x0164|0x0166)";
action "kldload if_run";
};
@@ -2093,7 +2093,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x0b95";
- match "product" "(0x1720|0x1780|0x7720|0x772a|0x772b)";
+ match "product" "(0x1720|0x1780|0x7720|0x772a|0x772b|0x7e2b)";
action "kldload if_axe";
};
@@ -4205,6 +4205,15 @@ nomatch 32 {
nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
+ match "intclass" "0x02";
+ match "intsubclass" "0x02";
+ match "intprotocol" "0xff";
+ action "kldload umodem";
+};
+
+nomatch 32 {
+ match "bus" "uhub[0-9]+";
+ match "mode" "host";
match "intclass" "0x03";
match "intsubclass" "0x01";
match "intprotocol" "0x01";
@@ -4327,5 +4336,5 @@ nomatch 32 {
action "kldload umass";
};
-# 1645 USB entries processed
+# 1652 USB entries processed
diff --git a/etc/periodic/daily/404.status-zfs b/etc/periodic/daily/404.status-zfs
index 81cc3e4bbb38..df23bae7a37e 100755
--- a/etc/periodic/daily/404.status-zfs
+++ b/etc/periodic/daily/404.status-zfs
@@ -16,12 +16,21 @@ case "$daily_status_zfs_enable" in
echo
echo 'Checking status of zfs pools:'
- out=`zpool status -x`
- echo "$out"
+ case "$daily_status_zfs_zpool_list_enable" in
+ [Yy][Ee][Ss])
+ lout=`zpool list`
+ echo "$lout"
+ echo
+ ;;
+ *)
+ ;;
+ esac
+ sout=`zpool status -x`
+ echo "$sout"
# zpool status -x always exits with 0, so we have to interpret its
# output to see what's going on.
- if [ "$out" = "all pools are healthy" \
- -o "$out" = "no pools available" ]; then
+ if [ "$sout" = "all pools are healthy" \
+ -o "$sout" = "no pools available" ]; then
rc=0
else
rc=1
diff --git a/etc/rc.d/LOGIN b/etc/rc.d/LOGIN
index 2b45ba88a4b4..ad4c8a7dbfc7 100755
--- a/etc/rc.d/LOGIN
+++ b/etc/rc.d/LOGIN
@@ -4,7 +4,7 @@
#
# PROVIDE: LOGIN
-# REQUIRE: DAEMON
+# REQUIRE: DAEMON utx
# This is a dummy dependency to ensure user services such as xdm,
# inetd, cron and kerberos are started after everything else, in case
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index a665ba9f8a88..460de6f40706 100644
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -144,6 +144,7 @@ FILES= DAEMON \
tmp \
${_ubthidhci} \
ugidfw \
+ ${_utx} \
var \
virecover \
watchdogd \
@@ -177,6 +178,10 @@ _nscd= nscd
_ubthidhci= ubthidhci
.endif
+.if ${MK_UTMPX} != "no"
+_utx= utx
+.endif
+
FILESDIR= /etc/rc.d
FILESMODE= ${BINMODE}
diff --git a/etc/rc.d/SERVERS b/etc/rc.d/SERVERS
index 3398487cb84f..1cf019a056dd 100755
--- a/etc/rc.d/SERVERS
+++ b/etc/rc.d/SERVERS
@@ -4,7 +4,7 @@
#
# PROVIDE: SERVERS
-# REQUIRE: mountcritremote abi ldconfig savecore
+# REQUIRE: mountcritremote abi ldconfig savecore watchdogd
# This is a dummy dependency, for early-start servers relying on
# some basic configuration.
diff --git a/etc/rc.d/addswap b/etc/rc.d/addswap
index 79bf1f1a1d95..78a45c556541 100755
--- a/etc/rc.d/addswap
+++ b/etc/rc.d/addswap
@@ -6,7 +6,7 @@
#
# PROVIDE: addswap
-# REQUIRE: FILESYSTEMS
+# REQUIRE: FILESYSTEMS kld
# KEYWORD: nojail
. /etc/rc.subr
diff --git a/etc/rc.d/amd b/etc/rc.d/amd
index e313f0cd2490..2ed70ebfb106 100755
--- a/etc/rc.d/amd
+++ b/etc/rc.d/amd
@@ -19,15 +19,8 @@ extra_commands="reload"
amd_precmd()
{
- if ! checkyesno nfs_client_enable; then
- force_depend nfsclient || return 1
- fi
-
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
+ force_depend nfsclient nfs_client || return 1
+ force_depend rpcbind || return 1
case ${amd_map_program} in
[Nn][Oo] | '')
@@ -49,7 +42,6 @@ amd_precmd()
command_args="> /var/run/amd.pid 2> /dev/null"
;;
esac
- return 0
}
load_rc_config $name
diff --git a/etc/rc.d/apmd b/etc/rc.d/apmd
index 2a326c18726f..beca9121172a 100755
--- a/etc/rc.d/apmd
+++ b/etc/rc.d/apmd
@@ -19,24 +19,18 @@ apmd_prestart()
{
case `${SYSCTL_N} hw.machine_arch` in
i386)
- # Enable apm if it is not already enabled
- if ! checkyesno apm_enable && \
- ! /etc/rc.d/apm forcestatus 1>/dev/null 2>&1
- then
- force_depend apm || return 1
- fi
+ force_depend apm || return 1
# Warn user about acpi apm compatibility support which
# does not work with apmd.
if [ ! -e /dev/apmctl ]; then
- warn "/dev/apmctl not found; kernel is missing apm(4)"
+ warn "/dev/apmctl not found; kernel is missing apm(4)"
fi
;;
*)
return 1
;;
esac
- return 0
}
load_rc_config $name
diff --git a/etc/rc.d/cleanvar b/etc/rc.d/cleanvar
index 62c8f42db70c..dade4a21bcc2 100755
--- a/etc/rc.d/cleanvar
+++ b/etc/rc.d/cleanvar
@@ -58,8 +58,6 @@ cleanvar_start ()
{
if [ -d /var/run -a ! -f /var/run/clean_var ]; then
purgedir /var/run
- # And an initial utmpx active session file
- (cd /var/run && cp /dev/null utx.active && chmod 644 utx.active)
>/var/run/clean_var
fi
if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then
diff --git a/etc/rc.d/devfs b/etc/rc.d/devfs
index 82278af53cf4..206a3eddaa27 100755
--- a/etc/rc.d/devfs
+++ b/etc/rc.d/devfs
@@ -16,7 +16,8 @@ stop_cmd=':'
devfs_start()
{
- if [ -n "$devfs_system_ruleset" -o -n "$devfs_set_rulesets" ]; then
+ if [ -n "$devfs_system_ruleset" -o -n "$devfs_set_rulesets" ] ||
+ checkyesno devfs_load_rulesets; then
devfs_init_rulesets
if [ -n "$devfs_system_ruleset" ]; then
devfs_set_ruleset $devfs_system_ruleset /dev
diff --git a/etc/rc.d/keyserv b/etc/rc.d/keyserv
index 84b169a471ce..33c631a6df8b 100755
--- a/etc/rc.d/keyserv
+++ b/etc/rc.d/keyserv
@@ -19,13 +19,7 @@ start_precmd="keyserv_prestart"
keyserv_prestart()
{
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
-
- return 0
+ force_depend rpcbind || return 1
}
load_rc_config $name
diff --git a/etc/rc.d/lockd b/etc/rc.d/lockd
index 135dda75dcb4..970477378a40 100755
--- a/etc/rc.d/lockd
+++ b/etc/rc.d/lockd
@@ -15,28 +15,16 @@ name="lockd"
rcvar=rpc_lockd_enable
command="/usr/sbin/rpc.${name}"
start_precmd='lockd_precmd'
-stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable'
-status_precmd=$stop_precmd
# Make sure that we are either an NFS client or server, and that we get
# the correct flags from rc.conf(5).
#
lockd_precmd()
{
- local ret
- ret=0
-
- if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable
- then
- ret=1
- fi
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || ret=1
- fi
+ force_depend rpcbind || return 1
+ force_depend statd rpc_statd || return 1
+
rc_flags=${rpc_lockd_flags}
- return ${ret}
}
load_rc_config $name
diff --git a/etc/rc.d/mountd b/etc/rc.d/mountd
index 826a15885c49..f3ebfdb5b86e 100755
--- a/etc/rc.d/mountd
+++ b/etc/rc.d/mountd
@@ -19,11 +19,7 @@ extra_commands="reload"
mountd_precmd()
{
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
+ force_depend rpcbind || return 1
# mountd flags will differ depending on rc.conf settings
#
@@ -48,8 +44,8 @@ mountd_precmd()
fi
rm -f /var/db/mountdtab
- ( umask 022 ; > /var/db/mountdtab )
- return 0
+ ( umask 022 ; > /var/db/mountdtab ) ||
+ err 1 'Cannot create /var/db/mountdtab'
}
load_rc_config $name
diff --git a/etc/rc.d/nfsd b/etc/rc.d/nfsd
index 235a8660651c..e067ad1ec779 100755
--- a/etc/rc.d/nfsd
+++ b/etc/rc.d/nfsd
@@ -48,31 +48,15 @@ nfsd_precmd()
if checkyesno nfsv4_server_enable; then
sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null
- if ! checkyesno nfsuserd_enable && \
- ! /etc/rc.d/nfsuserd forcestatus 1>/dev/null 2>&1
- then
- if ! force_depend nfsuserd; then
- err 1 "Cannot run nfsuserd"
- fi
- fi
+ force_depend nfsuserd || err 1 "Cannot run nfsuserd"
else
echo 'NFSv4 is disabled'
sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null
fi
fi
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
-
- if ! checkyesno mountd_enable && \
- ! /etc/rc.d/mountd forcestatus 1>/dev/null 2>&1
- then
- force_depend mountd || return 1
- fi
- return 0
+ force_depend rpcbind || return 1
+ force_depend mountd || return 1
}
run_rc_command "$1"
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index f86fd3a54f54..5903accff150 100755
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -98,8 +98,10 @@ routing_stop_inet6()
local i
route -n flush -inet6
- for i in ${ipv6_network_interfaces}; do
- ifconfig $i inet6 -defaultif
+ for i in `list_net_interfaces`; do
+ if ipv6if $i; then
+ ifconfig $i inet6 -defaultif
+ fi
done
}
diff --git a/etc/rc.d/statd b/etc/rc.d/statd
index 4e4a0a4cac3e..511983082a4b 100755
--- a/etc/rc.d/statd
+++ b/etc/rc.d/statd
@@ -15,28 +15,15 @@ name="statd"
rcvar=rpc_statd_enable
command="/usr/sbin/rpc.${name}"
start_precmd='statd_precmd'
-stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable'
-status_precmd=$stop_precmd
# Make sure that we are either an NFS client or server, and that we get
# the correct flags from rc.conf(5).
#
statd_precmd()
{
- local ret
- ret=0
-
- if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable
- then
- ret=1
- fi
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || ret=1
- fi
+ force_depend rpcbind || return 1
+
rc_flags=${rpc_statd_flags}
- return ${ret}
}
load_rc_config $name
diff --git a/etc/rc.d/utx b/etc/rc.d/utx
new file mode 100755
index 000000000000..e23ae008eb8f
--- /dev/null
+++ b/etc/rc.d/utx
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: utx
+# REQUIRE: DAEMON cleanvar
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="utx"
+start_cmd="utx boot"
+stop_cmd="utx shutdown"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/etc/rc.d/var b/etc/rc.d/var
index 0655658bd967..2b4121985eff 100755
--- a/etc/rc.d/var
+++ b/etc/rc.d/var
@@ -28,7 +28,7 @@
#
# PROVIDE: var
-# REQUIRE: FILESYSTEMS kld
+# REQUIRE: FILESYSTEMS kld addswap
. /etc/rc.subr
diff --git a/etc/rc.d/watchdogd b/etc/rc.d/watchdogd
index 043e5bc0274b..d3c0d9c4d15d 100755
--- a/etc/rc.d/watchdogd
+++ b/etc/rc.d/watchdogd
@@ -28,7 +28,7 @@
#
# PROVIDE: watchdogd
-# REQUIRE: DAEMON cleanvar
+# REQUIRE: FILESYSTEMS cleanvar syslogd
# KEYWORD: nojail shutdown
. /etc/rc.subr
diff --git a/etc/rc.d/ypbind b/etc/rc.d/ypbind
index 4dbf3519f390..71aea92c8033 100755
--- a/etc/rc.d/ypbind
+++ b/etc/rc.d/ypbind
@@ -11,22 +11,20 @@
. /etc/rc.subr
name="ypbind"
-command="/usr/sbin/${name}"
-start_precmd="ypbind_precmd"
+rcvar="nis_client_enable"
load_rc_config $name
-rcvar="nis_client_enable"
+
+command="/usr/sbin/${name}"
command_args="${nis_client_flags}"
+start_precmd="ypbind_precmd"
+
ypbind_precmd()
{
local _domain
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
+ force_depend rpcbind || return 1
_domain=`domainname`
if [ -z "$_domain" ]; then
diff --git a/etc/rc.d/yppasswdd b/etc/rc.d/yppasswdd
index fbb80bcf443a..cc25d9f6b1e0 100755
--- a/etc/rc.d/yppasswdd
+++ b/etc/rc.d/yppasswdd
@@ -11,27 +11,22 @@
. /etc/rc.subr
name="yppasswdd"
-command="/usr/sbin/rpc.${name}"
-start_precmd="yppasswdd_precmd"
+rcvar="nis_yppasswdd_enable"
load_rc_config $name
-rcvar="nis_yppasswdd_enable"
+
+command="/usr/sbin/rpc.${name}"
command_args="${nis_yppasswdd_flags}"
+start_precmd="yppasswdd_precmd"
+
yppasswdd_precmd()
{
local _domain
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
- if ! checkyesno nis_server_enable && \
- ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
- then
- force_depend ypserv || return 1
- fi
+ force_depend rpcbind || return 1
+ force_depend ypserv nis_server || return 1
+
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "NIS domainname(1) is not set."
diff --git a/etc/rc.d/ypserv b/etc/rc.d/ypserv
index 8e17fd77398b..90e70614717f 100755
--- a/etc/rc.d/ypserv
+++ b/etc/rc.d/ypserv
@@ -11,21 +11,20 @@
name="ypserv"
rcvar="nis_server_enable"
-command="/usr/sbin/${name}"
-start_precmd="ypserv_prestart"
load_rc_config $name
+
+command="/usr/sbin/${name}"
command_args="${nis_server_flags}"
+start_precmd="ypserv_prestart"
+
ypserv_prestart()
{
local _domain
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
+ force_depend rpcbind || return 1
+
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "NIS domainname(1) is not set."
diff --git a/etc/rc.d/ypset b/etc/rc.d/ypset
index 78c408bde8dd..f725545ac563 100755
--- a/etc/rc.d/ypset
+++ b/etc/rc.d/ypset
@@ -11,25 +11,20 @@
name="ypset"
rcvar="nis_ypset_enable"
-command="/usr/sbin/${name}"
-start_precmd="ypset_precmd"
+
load_rc_config $name
+
+command="/usr/sbin/${name}"
command_args="${nis_ypset_flags}"
+start_precmd="ypset_precmd"
+
ypset_precmd()
{
local _domain
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
- if ! checkyesno nis_client_enable && \
- ! /etc/rc.d/ypbind forcestatus 1>/dev/null 2>&1
- then
- force_depend ypbind || return 1
- fi
+ force_depend rpcbind || return 1
+ force_depend ypbind nis_client || return 1
_domain=`domainname`
if [ -z "$_domain" ]; then
diff --git a/etc/rc.d/ypupdated b/etc/rc.d/ypupdated
index 98ef2038565f..4098bd773c3e 100755
--- a/etc/rc.d/ypupdated
+++ b/etc/rc.d/ypupdated
@@ -11,6 +11,9 @@
name="ypupdated"
rcvar="rpc_ypupdated_enable"
+
+load_rc_config $name
+
command="/usr/sbin/rpc.${name}"
start_precmd="rpc_ypupdated_precmd"
@@ -18,16 +21,8 @@ rpc_ypupdated_precmd()
{
local _domain
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
- if ! checkyesno nis_server_enable && \
- ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
- then
- force_depend ypserv || return 1
- fi
+ force_depend rpcbind || return 1
+ force_depend ypserv nis_server || return 1
_domain=`domainname`
if [ -z "$_domain" ]; then
@@ -36,5 +31,4 @@ rpc_ypupdated_precmd()
fi
}
-load_rc_config $name
run_rc_command "$1"
diff --git a/etc/rc.d/ypxfrd b/etc/rc.d/ypxfrd
index f125a30159db..63924e468f0f 100755
--- a/etc/rc.d/ypxfrd
+++ b/etc/rc.d/ypxfrd
@@ -11,25 +11,20 @@
name="ypxfrd"
rcvar="nis_ypxfrd_enable"
-command="/usr/sbin/rpc.${name}"
-start_precmd="ypxfrd_precmd"
+
load_rc_config $name
+
+command="/usr/sbin/rpc.${name}"
command_args="${nis_ypxfrd_flags}"
+start_precmd="ypxfrd_precmd"
+
ypxfrd_precmd()
{
local _domain
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
- if ! checkyesno nis_server_enable && \
- ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
- then
- force_depend ypserv || return 1
- fi
+ force_depend rpcbind || return 1
+ force_depend ypserv nis_server || return 1
_domain=`domainname`
if [ -z "$_domain" ]; then
diff --git a/etc/rc.resume b/etc/rc.resume
index 3b2e9706643c..b68f9819f64c 100755
--- a/etc/rc.resume
+++ b/etc/rc.resume
@@ -43,12 +43,6 @@ if [ -r /var/run/rc.suspend.pid ]; then
echo 'rc.resume: killed rc.suspend that was still around'
fi
-if [ -r /var/run/rc.suspend.tch ]; then
- _t=`cat /var/run/rc.suspend.tch`
- /sbin/sysctl -n kern.timecounter.hardware=$_t > /dev/null 2>&1
- /bin/rm -f /var/run/rc.suspend.tch
-fi
-
if [ -r /var/run/moused.pid ]; then
pkill -HUP -F /var/run/moused.pid
fi
diff --git a/etc/rc.subr b/etc/rc.subr
index 0da7c07a4083..e629bc7db82e 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -71,22 +71,29 @@ set_rcvar_obsolete()
}
#
-# force_depend script
+# force_depend script [rcvar]
# Force a service to start. Intended for use by services
-# to resolve dependency issues. It is assumed the caller
-# has check to make sure this call is necessary
+# to resolve dependency issues.
# $1 - filename of script, in /etc/rc.d, to run
+# $2 - name of the script's rcvar (minus the _enable)
#
force_depend()
{
+ local _depend _dep_rcvar
+
_depend="$1"
+ _dep_rcvar="${2:-$1}_enable"
+
+ [ -n "$rc_fast" ] && ! checkyesno always_force_depends &&
+ checkyesno $_dep_rcvar && return 0
+
+ /etc/rc.d/${_depend} forcestatus >/dev/null 2>&1 && return 0
info "${name} depends on ${_depend}, which will be forced to start."
if ! /etc/rc.d/${_depend} forcestart; then
warn "Unable to force ${_depend}. It may already be running."
return 1
fi
- return 0
}
#
diff --git a/etc/rc.suspend b/etc/rc.suspend
index 90c085b8acf2..5f22cd1a05b1 100755
--- a/etc/rc.suspend
+++ b/etc/rc.suspend
@@ -43,18 +43,6 @@ fi
echo $$ 2> /dev/null > /var/run/rc.suspend.pid
-_t=`/sbin/sysctl -n kern.timecounter.hardware 2> /dev/null`
-case ${_t#ACPI-} in
-fast|safe)
- /bin/rm -f /var/run/rc.suspend.tch
- ;;
-*)
- { /sbin/sysctl -n kern.timecounter.hardware=ACPI-fast || \
- /sbin/sysctl -n kern.timecounter.hardware=ACPI-safe; } \
- > /dev/null 2>&1 && echo $_t > /var/run/rc.suspend.tch
- ;;
-esac
-
# If you have troubles on suspending with PC-CARD modem, try this.
# See also contrib/pccardq.c (Only for PAO users).
# pccardq | awk -F '~' '$5 == "filled" && $4 ~ /uart/ \