summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.d/lockd18
-rwxr-xr-xetc/rc.d/mountcritremote79
-rwxr-xr-xetc/rc.d/named53
-rwxr-xr-xetc/rc.d/nfsd14
-rwxr-xr-xetc/rc.d/nfslocking18
-rwxr-xr-xetc/rc.d/ntpd6
-rwxr-xr-xetc/rc.d/ntpdate15
-rwxr-xr-xetc/rc.d/root45
-rwxr-xr-xetc/rc.d/route6d14
-rwxr-xr-xetc/rc.d/routed17
-rwxr-xr-xetc/rc.d/rpcbind6
-rwxr-xr-xetc/rc.d/rtadvd59
-rwxr-xr-xetc/rc.d/savecore52
-rwxr-xr-xetc/rc.d/securelevel35
-rwxr-xr-xetc/rc.d/sendmail72
-rwxr-xr-xetc/rc.d/sshd6
-rw-r--r--etc/rc.d/statd18
-rwxr-xr-xetc/rc.d/swap116
-rw-r--r--etc/rc.d/sysctl24
-rwxr-xr-xetc/rc.d/syslogd15
-rwxr-xr-xetc/rc.d/ttys37
-rwxr-xr-xetc/rc.d/virecover10
-rwxr-xr-xetc/rc.d/ypbind25
-rwxr-xr-xetc/rc.d/yppasswdd37
-rwxr-xr-xetc/rc.d/ypserv28
25 files changed, 206 insertions, 513 deletions
diff --git a/etc/rc.d/lockd b/etc/rc.d/lockd
index 036fd68..6492849 100644
--- a/etc/rc.d/lockd
+++ b/etc/rc.d/lockd
@@ -13,20 +13,10 @@
arg=$1
-case ${OSTYPE} in
-FreeBSD)
- RCVAR_SERVER="nfs_server_enable"
- RCVAR_CLIENT="nfs_client_enable"
- RCVAR_STATD="rpc_statd_enable"
- RCVAR_LOCKD="rpc_lockd_enable"
- ;;
-NetBSD)
- RCVAR_SERVER="nfs_server"
- RCVAR_CLIENT="nfs_client"
- RCVAR_STATD="statd"
- RCVAR_LOCKD="lockd"
- ;;
-esac
+RCVAR_SERVER="nfs_server_enable"
+RCVAR_CLIENT="nfs_client_enable"
+RCVAR_STATD="rpc_statd_enable"
+RCVAR_LOCKD="rpc_lockd_enable"
start_precmd='checkyesno ${RCVAR_SERVER} || checkyesno ${RCVAR_CLIENT} ||
[ -n "$rc_force" ]'
diff --git a/etc/rc.d/mountcritremote b/etc/rc.d/mountcritremote
index 2a8d004..3467d0c 100755
--- a/etc/rc.d/mountcritremote
+++ b/etc/rc.d/mountcritremote
@@ -12,16 +12,8 @@
name="mountcritremote"
stop_cmd=":"
-
-case ${OSTYPE} in
- FreeBSD)
- start_cmd="mountcritremote_start"
- start_precmd="mountcritremote_precmd"
- ;;
-NetBSD)
- start_cmd="mountcritremote_start"
- ;;
-esac
+start_cmd="mountcritremote_start"
+start_precmd="mountcritremote_precmd"
# Mount NFS filesystems if present in /etc/fstab
#
@@ -47,50 +39,39 @@ mountcritremote_precmd()
mountcritremote_start()
{
- case ${OSTYPE} in
- FreeBSD)
- # Mount nfs filesystems.
- #
- echo -n 'Mounting NFS file systems:'
- mount -a -t nfs
- echo '.'
+ # Mount nfs filesystems.
+ #
+ echo -n 'Mounting NFS file systems:'
+ mount -a -t nfs
+ echo '.'
- # Mount other network filesystems if present in /etc/fstab.
- case ${extra_netfs_types} in
- [Nn][Oo])
- ;;
- *)
- netfs_types="${netfs_types} ${extra_netfs_types}"
- ;;
- esac
+ # Mount other network filesystems if present in /etc/fstab.
+ case ${extra_netfs_types} in
+ [Nn][Oo])
+ ;;
+ *)
+ netfs_types="${netfs_types} ${extra_netfs_types}"
+ ;;
+ esac
- for i in ${netfs_types}; do
- fstype=${i%:*}
- fsdecr=${i#*:}
+ for i in ${netfs_types}; do
+ fstype=${i%:*}
+ fsdecr=${i#*:}
- [ "${fstype}" = "nfs" ] && continue
+ [ "${fstype}" = "nfs" ] && continue
- case "`mount -d -a -t ${fstype}`" in
- *mount_${fstype}*)
- echo -n "Mounting ${fsdecr} file systems:"
- mount -a -t ${fstype}
- echo '.'
- ;;
- esac
- done
+ case "`mount -d -a -t ${fstype}`" in
+ *mount_${fstype}*)
+ echo -n "Mounting ${fsdecr} file systems:"
+ mount -a -t ${fstype}
+ echo '.'
+ ;;
+ esac
+ done
- # Cleanup /var again just in case it's a network mount.
- /etc/rc.d/cleanvar reload
- rm -f /var/run/clean_var /var/spool/lock/clean_var
- ;;
- NetBSD)
- # Mount critical filesystems that may be `remote'.
- # (as specified in $critical_filesystems_remote)
- # This usually includes /usr.
- #
- mount_critical_filesystems remote
- ;;
- esac
+ # Cleanup /var again just in case it's a network mount.
+ /etc/rc.d/cleanvar reload
+ rm -f /var/run/clean_var /var/spool/lock/clean_var
}
load_rc_config $name
diff --git a/etc/rc.d/named b/etc/rc.d/named
index c7ff4f8..0d4cb9d 100755
--- a/etc/rc.d/named
+++ b/etc/rc.d/named
@@ -17,17 +17,8 @@ command="/usr/sbin/${name}"
start_precmd="named_precmd"
required_dirs="$named_chrootdir" # if it is set, it must exist
extra_commands="reload"
-
-case ${OSTYPE} in
-FreeBSD)
- nuser=bind
- ngroup=bind
- ;;
-NetBSD)
- nuser=named
- ngroup=named
- ;;
-esac
+nuser=bind
+ngroup=bind
# If running in a chroot cage, ensure that the appropriate files
# exist inside the cage, as well as helper symlinks into the cage
@@ -78,40 +69,22 @@ make_symlinks()
named_precmd()
{
- case ${OSTYPE} in
- FreeBSD)
- ! checkyesno named_rcng && return 0
- # Is the user using a sandbox?
- if [ -z "$named_chrootdir" ]; then
- rc_flags="-u $nuser -g $ngroup $rc_flags"
- return 0
- fi
+ ! checkyesno named_rcng && return 0
+ # Is the user using a sandbox?
+ if [ -z "$named_chrootdir" ]; then
+ rc_flags="-u $nuser -g $ngroup $rc_flags"
+ return 0
+ fi
- # Do the following checks only if the user wants them done
- checkyesno named_chroot_autoupdate && chroot_autoupdate
- ;;
- NetBSD)
- chroot_autoupdate
- ;;
- esac
+ # Do the following checks only if the user wants them done
+ checkyesno named_chroot_autoupdate && chroot_autoupdate
- case ${OSTYPE} in
- FreeBSD)
- # Make the symlinks only if the user wants them done.
- checkyesno named_symlink_enable && make_symlinks
- ;;
- NetBSD)
- make_symlinks
- ;;
- esac
+ # Make the symlinks only if the user wants them done.
+ checkyesno named_symlink_enable && make_symlinks
# Change run_rc_commands()'s internal copy of $named_flags
#
- case ${OSTYPE} in
- FreeBSD)
- ! checkyesno named_rcng && return
- ;;
- esac
+ ! checkyesno named_rcng && return
rc_flags="-u $nuser -g $ngroup -t ${named_chrootdir} $rc_flags"
}
diff --git a/etc/rc.d/nfsd b/etc/rc.d/nfsd
index aa377608..19ccdbc 100755
--- a/etc/rc.d/nfsd
+++ b/etc/rc.d/nfsd
@@ -15,17 +15,9 @@ rcvar=`set_rcvar nfs_server`
command="/usr/sbin/${name}"
load_rc_config $name
-case ${OSTYPE} in
-FreeBSD)
- command_args="${nfs_server_flags}"
- start_precmd="nfsd_precmd"
- sig_stop="USR1"
- ;;
-NetBSD)
- required_vars="mountd rpcbind"
- start_precmd=
- ;;
-esac
+command_args="${nfs_server_flags}"
+start_precmd="nfsd_precmd"
+sig_stop="USR1"
nfsd_precmd()
{
diff --git a/etc/rc.d/nfslocking b/etc/rc.d/nfslocking
index 036fd68..6492849 100755
--- a/etc/rc.d/nfslocking
+++ b/etc/rc.d/nfslocking
@@ -13,20 +13,10 @@
arg=$1
-case ${OSTYPE} in
-FreeBSD)
- RCVAR_SERVER="nfs_server_enable"
- RCVAR_CLIENT="nfs_client_enable"
- RCVAR_STATD="rpc_statd_enable"
- RCVAR_LOCKD="rpc_lockd_enable"
- ;;
-NetBSD)
- RCVAR_SERVER="nfs_server"
- RCVAR_CLIENT="nfs_client"
- RCVAR_STATD="statd"
- RCVAR_LOCKD="lockd"
- ;;
-esac
+RCVAR_SERVER="nfs_server_enable"
+RCVAR_CLIENT="nfs_client_enable"
+RCVAR_STATD="rpc_statd_enable"
+RCVAR_LOCKD="rpc_lockd_enable"
start_precmd='checkyesno ${RCVAR_SERVER} || checkyesno ${RCVAR_CLIENT} ||
[ -n "$rc_force" ]'
diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd
index 46b38f2..0ec2d8a 100755
--- a/etc/rc.d/ntpd
+++ b/etc/rc.d/ntpd
@@ -17,12 +17,6 @@ command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="/etc/ntp.conf"
-case ${OSTYPE} in
-NetBSD)
- start_precmd="ntpd_precmd"
- ;;
-esac
-
ntpd_precmd()
{
if [ -z "$ntpd_chrootdir" ]; then
diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate
index bbc38d1..ea9d9cb 100755
--- a/etc/rc.d/ntpdate
+++ b/etc/rc.d/ntpdate
@@ -12,18 +12,9 @@
name="ntpdate"
rcvar=`set_rcvar`
-
-case ${OSTYPE} in
-FreeBSD)
- command="/usr/sbin/${name}"
- command_args=">/dev/null 2>&1"
- pidfile="/var/run/${name}.pid"
- ;;
-NetBSD)
- start_cmd="ntpdate_start"
- stop_cmd=":"
- ;;
-esac
+command="/usr/sbin/${name}"
+command_args=">/dev/null 2>&1"
+pidfile="/var/run/${name}.pid"
ntpdate_start()
{
diff --git a/etc/rc.d/root b/etc/rc.d/root
index e737972..90fe711 100755
--- a/etc/rc.d/root
+++ b/etc/rc.d/root
@@ -16,36 +16,27 @@ stop_cmd=":"
root_start()
{
- case ${OSTYPE} in
- FreeBSD)
- # root normally must be read/write, but if this is a BOOTP NFS
- # diskless boot it does not have to be.
- #
- case ${root_rw_mount} in
- [Nn][Oo] | '')
- ;;
- *)
- if ! mount -u -o rw /; then
- echo 'Mounting root filesystem rw failed, startup aborted'
- /bin/kill -QUIT $$
- fi
- ;;
- esac
-
- umount -a >/dev/null 2>&1
-
- # If we booted a special kernel remove the record
- # so we will boot the default kernel next time.
- if [ -e /boot/nextkernel ]; then
- rm -f /boot/nextkernel
- fi
+ # root normally must be read/write, but if this is a BOOTP NFS
+ # diskless boot it does not have to be.
+ #
+ case ${root_rw_mount} in
+ [Nn][Oo] | '')
;;
- NetBSD)
- umount -a >/dev/null 2>&1
- mount /
- rm -f /fastboot
+ *)
+ if ! mount -u -o rw /; then
+ echo 'Mounting root filesystem rw failed, startup aborted'
+ /bin/kill -QUIT $$
+ fi
;;
esac
+
+ umount -a >/dev/null 2>&1
+
+ # If we booted a special kernel remove the record
+ # so we will boot the default kernel next time.
+ if [ -e /boot/nextkernel ]; then
+ rm -f /boot/nextkernel
+ fi
}
load_rc_config $name
diff --git a/etc/rc.d/route6d b/etc/rc.d/route6d
index c7afb96..5553303 100755
--- a/etc/rc.d/route6d
+++ b/etc/rc.d/route6d
@@ -19,16 +19,8 @@ name="route6d"
#
load_rc_config $name
-case ${OSTYPE} in
-FreeBSD)
- rcvar="ipv6_router_enable"
- command="${ipv6_router:-/usr/sbin/${name}}"
- eval ${name}_flags=\"${ipv6_router_flags}\"
- ;;
-NetBSD)
- rcvar=$name
- command="/usr/sbin/${name}"
- ;;
-esac
+rcvar="ipv6_router_enable"
+command="${ipv6_router:-/usr/sbin/${name}}"
+eval ${name}_flags=\"${ipv6_router_flags}\"
run_rc_command "$1"
diff --git a/etc/rc.d/routed b/etc/rc.d/routed
index a23f1a8..2f02a2d 100755
--- a/etc/rc.d/routed
+++ b/etc/rc.d/routed
@@ -18,19 +18,10 @@ name="routed"
#
load_rc_config $name
-case ${OSTYPE} in
-FreeBSD)
- rcvar="router_enable"
- command="${router:-/sbin/${name}}"
- eval ${name}_flags=${router_flags}
- start_precmd=
- ;;
-NetBSD)
- rcvar=${name}
- command="/sbin/${name}"
- start_precmd="routed_precmd"
- ;;
-esac
+rcvar="router_enable"
+command="${router:-/sbin/${name}}"
+eval ${name}_flags=${router_flags}
+start_precmd=
routed_precmd()
{
diff --git a/etc/rc.d/rpcbind b/etc/rc.d/rpcbind
index e1c0932..9b5c73d 100755
--- a/etc/rc.d/rpcbind
+++ b/etc/rc.d/rpcbind
@@ -14,11 +14,5 @@ name="rpcbind"
rcvar=`set_rcvar`
command="/usr/sbin/${name}"
-case ${OSTYPE} in
-NetBSD)
- pidfile="/var/run/${name}.pid"
- ;;
-esac
-
load_rc_config $name
run_rc_command "$1"
diff --git a/etc/rc.d/rtadvd b/etc/rc.d/rtadvd
index 5a9b467..38e74e7 100755
--- a/etc/rc.d/rtadvd
+++ b/etc/rc.d/rtadvd
@@ -18,14 +18,7 @@ start_precmd="rtadvd_precmd"
rtadvd_precmd()
{
- case ${OSTYPE} in
- FreeBSD)
- IS_GATEWAY="checkyesno ipv6_gateway_enable"
- ;;
- NetBSD)
- IS_GATEWAY="eval [ \"$ip6mode\" = \"router\" ]"
- ;;
- esac
+ IS_GATEWAY="checkyesno ipv6_gateway_enable"
if ! ${IS_GATEWAY}; then
warn \
"${name} cannot be used on IPv6 host, only on an IPv6 router."
@@ -45,35 +38,31 @@ rtadvd_precmd()
# from another machine, so if you enable this, do it with
# enough care.)
#
- case ${OSTYPE} in
- FreeBSD)
- # If specific interfaces haven't been specified,
- # get a list of interfaces and enable it on them
- #
- case ${rtadvd_interfaces} in
- '')
- for i in `ifconfig -l` ; do
- case $i in
- lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*)
- continue
- ;;
- *)
- rtadvd_interfaces="${rtadvd_interfaces} ${i}"
- ;;
- esac
- done
- ;;
- esac
- command_args="${rtadvd_interfaces}"
-
- # Enable Router Renumbering, unicast case
- # (use correct src/dst addr)
- # rtadvd -R "in ipsec ah/transport/fec0:0:0:1::1-fec0:0:0:10::1/require" ${ipv6_network_interfaces}
- # Enable Router Renumbering, multicast case
- # (use correct src addr)
- # rtadvd -R "in ipsec ah/transport/ff05::2-fec0:0:0:10::1/require" ${ipv6_network_interfaces}
+ # If specific interfaces haven't been specified,
+ # get a list of interfaces and enable it on them
+ #
+ case ${rtadvd_interfaces} in
+ '')
+ for i in `ifconfig -l` ; do
+ case $i in
+ lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*)
+ continue
+ ;;
+ *)
+ rtadvd_interfaces="${rtadvd_interfaces} ${i}"
+ ;;
+ esac
+ done
;;
esac
+ command_args="${rtadvd_interfaces}"
+
+ # Enable Router Renumbering, unicast case
+ # (use correct src/dst addr)
+ # rtadvd -R "in ipsec ah/transport/fec0:0:0:1::1-fec0:0:0:10::1/require" ${ipv6_network_interfaces}
+ # Enable Router Renumbering, multicast case
+ # (use correct src addr)
+ # rtadvd -R "in ipsec ah/transport/ff05::2-fec0:0:0:10::1/require" ${ipv6_network_interfaces}
return 0
}
diff --git a/etc/rc.d/savecore b/etc/rc.d/savecore
index c31343e..47e84c2 100755
--- a/etc/rc.d/savecore
+++ b/etc/rc.d/savecore
@@ -16,12 +16,6 @@ start_cmd="savecore_start"
start_precmd="savecore_prestart"
stop_cmd=":"
-case ${OSTYPE} in
-NetBSD)
- rcvar=$name
- ;;
-esac
-
savecore_prestart()
{
# ${DUMPDIR} should be a directory or a symbolic link
@@ -29,38 +23,28 @@ savecore_prestart()
#
DUMPDIR="${dumpdir:-/var/crash}"
- case ${OSTYPE} in
- FreeBSD)
- # Quit if we have no dump device
- case ${dumpdev} in
- [Nn][Oo] | '')
- debug 'No dump device. Quitting.'
- return 1
- ;;
- esac
-
- # If there is no crash directory set it now
- case ${dumpdir} in
- '')
- dumpdir='/var/crash'
- ;;
- [Nn][Oo])
- dumpdir='NO'
- ;;
- esac
+ # Quit if we have no dump device
+ case ${dumpdev} in
+ [Nn][Oo] | '')
+ debug 'No dump device. Quitting.'
+ return 1
+ ;;
+ esac
- if [ ! -e "${dumpdev}" -o ! -d "${dumpdir}" ]; then
- warn "Wrong dump device or directory. Savecore not run."
- return 1
- fi
+ # If there is no crash directory set it now
+ case ${dumpdir} in
+ '')
+ dumpdir='/var/crash'
;;
- NetBSD)
- if [ ! -d "${dumpdir}" ]; then
- warn "No /var/crash directory; savecore not run."
- return 1
- fi
+ [Nn][Oo])
+ dumpdir='NO'
;;
esac
+
+ if [ ! -e "${dumpdev}" -o ! -d "${dumpdir}" ]; then
+ warn "Wrong dump device or directory. Savecore not run."
+ return 1
+ fi
return 0
}
diff --git a/etc/rc.d/securelevel b/etc/rc.d/securelevel
index 5f133c0..31e266c 100755
--- a/etc/rc.d/securelevel
+++ b/etc/rc.d/securelevel
@@ -19,36 +19,11 @@ securelevel_start()
#
/etc/rc.d/sysctl lastload
- case ${OSTYPE} in
- FreeBSD)
- case ${kern_securelevel_enable} in
- [Yy][Ee][Ss])
- if [ ${kern_securelevel} -ge 0 ]; then
- echo 'Raising kernel security level: '
- ${SYSCTL_W} kern.securelevel=${kern_securelevel}
- fi
- ;;
- esac
- ;;
- NetBSD)
- # if $securelevel is set higher, change it here, else if
- # it is 0, change it to 1 here, before we start daemons
- # or login services.
- #
- osecurelevel=`sysctl -n kern.securelevel`
- if [ -n "$securelevel" -a "$securelevel" != "$osecurelevel" ]; then
- if [ "$securelevel" -lt "$osecurelevel" ]; then
- echo "Can't lower securelevel."
- exit 1
- else
- echo -n "Setting securelevel: "
- ${SYSCTL_W} kern.securelevel=$securelevel
- fi
- else
- if [ "$osecurelevel" = 0 ]; then
- echo -n "Setting securelevel: "
- ${SYSCTL_W} kern.securelevel=1
- fi
+ case ${kern_securelevel_enable} in
+ [Yy][Ee][Ss])
+ if [ ${kern_securelevel} -ge 0 ]; then
+ echo 'Raising kernel security level: '
+ ${SYSCTL_W} kern.securelevel=${kern_securelevel}
fi
;;
esac
diff --git a/etc/rc.d/sendmail b/etc/rc.d/sendmail
index e7efd3a..a921267 100755
--- a/etc/rc.d/sendmail
+++ b/etc/rc.d/sendmail
@@ -18,29 +18,17 @@
name="sendmail"
rcvar=`set_rcvar`
required_files="/etc/mail/${name}.cf"
+command=${sendmail_program:-/usr/sbin/sendmail}
+pidfile=${sendmail_pidfile:-/var/run/sendmail.pid}
-case ${OSTYPE} in
-FreeBSD)
- command=${sendmail_program:-/usr/sbin/sendmail}
- pidfile=${sendmail_pidfile:-/var/run/sendmail.pid}
+load_rc_config $name
- load_rc_config $name
-
- case ${sendmail_enable} in
- [Nn][Oo][Nn][Ee])
- sendmail_enable="NO"
- sendmail_submit_enable="NO"
- sendmail_outbound_enable="NO"
- sendmail_msp_queue_enable="NO"
- ;;
- esac
- ;;
-NetBSD)
- command="/usr/sbin/${name}"
- pidfile="/var/run/${name}.pid"
- start_precmd="sendmail_precmd"
-
- load_rc_config $name
+case ${sendmail_enable} in
+[Nn][Oo][Nn][Ee])
+ sendmail_enable="NO"
+ sendmail_submit_enable="NO"
+ sendmail_outbound_enable="NO"
+ sendmail_msp_queue_enable="NO"
;;
esac
@@ -83,29 +71,25 @@ sendmail_precmd()
run_rc_command "$1"
-case ${OSTYPE} in
-FreeBSD)
- required_files=
+required_files=
- if ! checkyesno sendmail_enable; then
- name="sendmail_submit"
- rcvar=`set_rcvar`
- start_cmd="${command} ${sendmail_submit_flags}"
- run_rc_command "$1"
- fi
-
- if ! checkyesno sendmail_outbound_enable; then
- name="sendmail_outbound"
- rcvar=`set_rcvar`
- start_cmd="${command} ${sendmail_outbound_flags}"
- run_rc_command "$1"
- fi
+if ! checkyesno sendmail_enable; then
+ name="sendmail_submit"
+ rcvar=`set_rcvar`
+ start_cmd="${command} ${sendmail_submit_flags}"
+ run_rc_command "$1"
+fi
- name="sendmail_clientmqueue"
- rcvar="sendmail_msp_queue_enable"
- start_cmd="${command} ${sendmail_msp_queue_flags}"
- pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
- required_files="/etc/mail/submit.cf"
+if ! checkyesno sendmail_outbound_enable; then
+ name="sendmail_outbound"
+ rcvar=`set_rcvar`
+ start_cmd="${command} ${sendmail_outbound_flags}"
run_rc_command "$1"
- ;;
-esac
+fi
+
+name="sendmail_clientmqueue"
+rcvar="sendmail_msp_queue_enable"
+start_cmd="${command} ${sendmail_msp_queue_flags}"
+pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
+required_files="/etc/mail/submit.cf"
+run_rc_command "$1"
diff --git a/etc/rc.d/sshd b/etc/rc.d/sshd
index 78f5d12..235547f 100755
--- a/etc/rc.d/sshd
+++ b/etc/rc.d/sshd
@@ -16,12 +16,6 @@ keygen_cmd="sshd_keygen"
start_precmd="sshd_precmd"
pidfile="/var/run/${name}.pid"
extra_commands="keygen reload"
-case ${OSTYPE} in
-NetBSD)
- command="/usr/sbin/${name}"
- required_files="/etc/ssh/sshd_config"
- ;;
-esac
sshd_keygen()
{
diff --git a/etc/rc.d/statd b/etc/rc.d/statd
index 036fd68..6492849 100644
--- a/etc/rc.d/statd
+++ b/etc/rc.d/statd
@@ -13,20 +13,10 @@
arg=$1
-case ${OSTYPE} in
-FreeBSD)
- RCVAR_SERVER="nfs_server_enable"
- RCVAR_CLIENT="nfs_client_enable"
- RCVAR_STATD="rpc_statd_enable"
- RCVAR_LOCKD="rpc_lockd_enable"
- ;;
-NetBSD)
- RCVAR_SERVER="nfs_server"
- RCVAR_CLIENT="nfs_client"
- RCVAR_STATD="statd"
- RCVAR_LOCKD="lockd"
- ;;
-esac
+RCVAR_SERVER="nfs_server_enable"
+RCVAR_CLIENT="nfs_client_enable"
+RCVAR_STATD="rpc_statd_enable"
+RCVAR_LOCKD="rpc_lockd_enable"
start_precmd='checkyesno ${RCVAR_SERVER} || checkyesno ${RCVAR_CLIENT} ||
[ -n "$rc_force" ]'
diff --git a/etc/rc.d/swap1 b/etc/rc.d/swap1
index c558b1b..e3341b1 100755
--- a/etc/rc.d/swap1
+++ b/etc/rc.d/swap1
@@ -11,20 +11,8 @@
. /etc/rc.subr
name="swap1"
-
-case ${OSTYPE} in
-FreeBSD)
- start_cmd='swapon -a'
- stop_cmd=':'
- ;;
-NetBSD)
- # Add all block-type swap devices; these might be necessary
- # during disk checks.
- #
- start_cmd="swap1_start"
- stop_cmd="swap1_stop"
- ;;
-esac
+start_cmd='swapon -a'
+stop_cmd=':'
# Add all block-type swap devices; these might be necessary
# during disk checks.
diff --git a/etc/rc.d/sysctl b/etc/rc.d/sysctl
index 6a70577..6ecade3 100644
--- a/etc/rc.d/sysctl
+++ b/etc/rc.d/sysctl
@@ -13,18 +13,10 @@
name="sysctl"
stop_cmd=":"
-
-case ${OSTYPE} in
-FreeBSD)
- start_cmd="FreeBSD_start"
- extra_commands="reload lastload"
- reload_cmd="FreeBSD_start"
- lastload_cmd="FreeBSD_start last"
- ;;
-NetBSD)
- start_cmd="NetBSD_start"
- ;;
-esac
+start_cmd="FreeBSD_start"
+extra_commands="reload lastload"
+reload_cmd="FreeBSD_start"
+lastload_cmd="FreeBSD_start last"
FreeBSD_start()
{
@@ -58,13 +50,5 @@ FreeBSD_start()
fi
}
-NetBSD_start()
-{
- if [ -r /etc/sysctl.conf ]; then
- echo "Setting sysctl variables:"
- ${SYSCTL} -f /etc/sysctl.conf
- fi
-}
-
load_rc_config $name
run_rc_command "$1"
diff --git a/etc/rc.d/syslogd b/etc/rc.d/syslogd
index 6d94686..30a0b0a 100755
--- a/etc/rc.d/syslogd
+++ b/etc/rc.d/syslogd
@@ -20,18 +20,9 @@ extra_commands="reload"
_sockfile="/var/run/syslogd.sockets"
-case ${OSTYPE} in
-FreeBSD)
- pidfile="/var/run/syslog.pid"
- evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\""
- altlog_proglist="named"
- ;;
-NetBSD)
- pidfile="/var/run/${name}.pid"
- evalargs="rc_flags=\"-P \$_sockfile \$rc_flags\""
- altlog_proglist="named ntpd"
- ;;
-esac
+pidfile="/var/run/syslog.pid"
+evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\""
+altlog_proglist="named"
syslogd_precmd()
{
diff --git a/etc/rc.d/ttys b/etc/rc.d/ttys
index f4c404b5..acf6804 100755
--- a/etc/rc.d/ttys
+++ b/etc/rc.d/ttys
@@ -17,34 +17,15 @@ stop_cmd=":"
ttyflags_start()
{
- case ${OSTYPE} in
- FreeBSD)
-
- # Whack the pty perms back into shape.
- # XXX: there may be more ptys than this; maybe use
- # sysctl to find out how many?
- #
- if ls /dev/tty[pqrsPQRS]* > /dev/null 2>&1; then
- chflags 0 /dev/tty[pqrsPQRS]*
- chmod 666 /dev/tty[pqrsPQRS]*
- chown root:wheel /dev/tty[pqrsPQRS]*
- fi
- ;;
- NetBSD)
- # set flags on ttys.
- # (do early, in case they use tty for SLIP in network)
- #
- echo "Setting tty flags."
- ttyflags -a
-
- # setup ptys
- #
- # XXX: there may be more ptys than this; maybe use
- # sysctl to find out how many?
- #
- chmod 666 /dev/tty[pqrs]*
- ;;
- esac
+ # Whack the pty perms back into shape.
+ # XXX: there may be more ptys than this; maybe use
+ # sysctl to find out how many?
+ #
+ if ls /dev/tty[pqrsPQRS]* > /dev/null 2>&1; then
+ chflags 0 /dev/tty[pqrsPQRS]*
+ chmod 666 /dev/tty[pqrsPQRS]*
+ chown root:wheel /dev/tty[pqrsPQRS]*
+ fi
}
load_rc_config $name
diff --git a/etc/rc.d/virecover b/etc/rc.d/virecover
index 5ff8823..2531260 100755
--- a/etc/rc.d/virecover
+++ b/etc/rc.d/virecover
@@ -15,15 +15,7 @@
name="virecover"
stop_cmd=":"
-
-case ${OSTYPE} in
-FreeBSD)
- start_cmd="virecover_start"
- ;;
-NetBSD)
- command="/usr/libexec/${name}"
- ;;
-esac
+start_cmd="virecover_start"
virecover_start()
{
diff --git a/etc/rc.d/ypbind b/etc/rc.d/ypbind
index c15f08d..8c8644c 100755
--- a/etc/rc.d/ypbind
+++ b/etc/rc.d/ypbind
@@ -16,27 +16,16 @@ command="/usr/sbin/${name}"
start_precmd="ypbind_precmd"
load_rc_config $name
-case ${OSTYPE} in
-FreeBSD)
- rcvar="nis_client_enable"
- command_args="${nis_client_flags}"
- ;;
-NetBSD)
- rcvar=$name
- ;;
-esac
+rcvar="nis_client_enable"
+command_args="${nis_client_flags}"
ypbind_precmd()
{
- case ${OSTYPE} in
- FreeBSD)
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
- ;;
- esac
+ if ! checkyesno rpcbind_enable && \
+ ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
+ then
+ force_depend rpcbind || return 1
+ fi
_domain=`domainname`
if [ -z "$_domain" ]; then
diff --git a/etc/rc.d/yppasswdd b/etc/rc.d/yppasswdd
index 6d705fa..8d82d08 100755
--- a/etc/rc.d/yppasswdd
+++ b/etc/rc.d/yppasswdd
@@ -16,34 +16,21 @@ command="/usr/sbin/rpc.${name}"
start_precmd="yppasswdd_precmd"
load_rc_config $name
-case ${OSTYPE} in
-FreeBSD)
- rcvar="nis_yppasswdd_enable"
- command_args="${nis_yppasswdd_flags}"
- ;;
-NetBSD)
- rcvar=$name
- required_vars="rpcbind ypserv"
- ;;
-esac
+rcvar="nis_yppasswdd_enable"
+command_args="${nis_yppasswdd_flags}"
yppasswdd_precmd()
{
- case ${OSTYPE} in
- FreeBSD)
- 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
- ;;
- esac
-
+ 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
_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 e11807d..f13935c 100755
--- a/etc/rc.d/ypserv
+++ b/etc/rc.d/ypserv
@@ -15,35 +15,21 @@ command="/usr/sbin/${name}"
start_precmd="ypserv_precmd"
load_rc_config $name
-case ${OSTYPE} in
-FreeBSD)
- rcvar="nis_server_enable"
- command_args="${nis_server_flags}"
- ;;
-NetBSD)
- rcvar=${name}
- required_vars="rpcbind"
- ;;
-esac
+rcvar="nis_server_enable"
+command_args="${nis_server_flags}"
ypserv_precmd()
{
- case ${OSTYPE} in
- FreeBSD)
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
- ;;
- esac
-
+ if ! checkyesno rpcbind_enable && \
+ ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
+ then
+ force_depend rpcbind || return 1
+ fi
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "NIS domainname(1) is not set."
return 1
fi
-
if [ ! -d /var/yp/$_domain/. ]; then
warn "/var/yp/$_domain is not a directory."
return 1
OpenPOWER on IntegriCloud