From 0dfdc028b391b3b004f7264480d2cd9ab1b1b562 Mon Sep 17 00:00:00 2001 From: Antonio Huete Jimenez Date: Thu, 19 Apr 2018 16:07:46 -0700 Subject: [PATCH] rc.d - Be quiet when check if modules are loaded --- etc/rc.d/addswap | 2 +- etc/rc.d/ip6fw | 2 +- etc/rc.d/ipfw | 2 +- etc/rc.d/mountcritremote | 2 +- etc/rc.d/nfsclient | 2 +- etc/rc.d/nfsserver | 2 +- etc/rc.d/pf | 2 +- etc/rc.d/syscons | 2 +- etc/rc.d/vknetd | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/etc/rc.d/addswap b/etc/rc.d/addswap index cf250f8aa7..6789dee316 100644 --- a/etc/rc.d/addswap +++ b/etc/rc.d/addswap @@ -23,7 +23,7 @@ addswap_start() *) if [ -w "${swapfile}" ]; then # load vn kernel module if needed - kldstat -m vn || kldload -n vn || exit 1 + kldstat -qm vn || kldload -n vn || exit 1 echo "Adding ${swapfile} as additional swap" vnconfig -e vn0 ${swapfile} swap fi diff --git a/etc/rc.d/ip6fw b/etc/rc.d/ip6fw index a7e8cec88a..116f2e9a68 100644 --- a/etc/rc.d/ip6fw +++ b/etc/rc.d/ip6fw @@ -19,7 +19,7 @@ ip6fw_prestart() { # Load IPv6 firewall module, if not already loaded if ! ${SYSCTL} net.inet6.ip6.fw.enable > /dev/null 2>&1; then - kldstat -m ip6fw || kldload -n ip6fw || return 1 + kldstat -qm ip6fw || kldload -n ip6fw || return 1 fi return 0 } diff --git a/etc/rc.d/ipfw b/etc/rc.d/ipfw index 30c0ef8efe..c7ab3cdf22 100644 --- a/etc/rc.d/ipfw +++ b/etc/rc.d/ipfw @@ -19,7 +19,7 @@ ipfw_precmd() { # Load IPv4 firewall module, if not already loaded if ! ${SYSCTL} net.inet.ip.fw.enable > /dev/null 2>&1; then - kldstat -m ipfw || kldload -n ipfw || return 1 + kldstat -qm ipfw || kldload -n ipfw || return 1 fi return 0 } diff --git a/etc/rc.d/mountcritremote b/etc/rc.d/mountcritremote index 0d627ea83a..516e1330aa 100644 --- a/etc/rc.d/mountcritremote +++ b/etc/rc.d/mountcritremote @@ -27,7 +27,7 @@ mountcritremote_precmd() case "`mount -d -a -t nfs 2> /dev/null`" in *mount_nfs*) # Handle absent nfs client support - kldstat -m nfs || kldload -n nfs || return 1 + kldstat -qm nfs || kldload -n nfs || return 1 ;; esac return 0 diff --git a/etc/rc.d/nfsclient b/etc/rc.d/nfsclient index a596051e1f..1021cef891 100644 --- a/etc/rc.d/nfsclient +++ b/etc/rc.d/nfsclient @@ -18,7 +18,7 @@ stop_cmd="unmount_all" # Load nfs module if it was not compiled into the kernel nfsclient_precmd() { - kldstat -m nfs || kldload -n nfs || return 1 + kldstat -qm nfs || kldload -n nfs || return 1 return 0 } diff --git a/etc/rc.d/nfsserver b/etc/rc.d/nfsserver index 55a217f713..c19452b1c1 100644 --- a/etc/rc.d/nfsserver +++ b/etc/rc.d/nfsserver @@ -16,7 +16,7 @@ stop_cmd=":" # Load nfs modules if they were not compiled into the kernel nfsserver_start() { - kldstat -m nfs || kldload -n nfs || return 1 + kldstat -qm nfs || kldload -n nfs || return 1 return 0 } diff --git a/etc/rc.d/pf b/etc/rc.d/pf index 605b333d3a..efa49fbda7 100644 --- a/etc/rc.d/pf +++ b/etc/rc.d/pf @@ -28,7 +28,7 @@ extra_commands="reload resync status" pf_prestart() { # load pf kernel module if needed - kldstat -m pf || kldload -n pf || exit 1 + kldstat -qm pf || kldload -n pf || exit 1 # check for pf rules if [ ! -r "${pf_rules}" ] diff --git a/etc/rc.d/syscons b/etc/rc.d/syscons index 3d58eb3b3b..7bd5b827e8 100644 --- a/etc/rc.d/syscons +++ b/etc/rc.d/syscons @@ -159,7 +159,7 @@ syscons_start() for i in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do kldunload ${i} done - kldstat -m ${saver}_saver || kldload -n ${saver}_saver + kldstat -qm ${saver}_saver || kldload -n ${saver}_saver ;; esac diff --git a/etc/rc.d/vknetd b/etc/rc.d/vknetd index c900f4e263..92b144322c 100644 --- a/etc/rc.d/vknetd +++ b/etc/rc.d/vknetd @@ -16,7 +16,7 @@ pidfile="/var/run/${name}.pid" vknetd_precmd() { # load if_tap kernel module if needed - kldstat -m if_tap || kldload -n if_tap || exit 1 + kldstat -qm if_tap || kldload -n if_tap || exit 1 } load_rc_config $name -- 2.41.0