summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-09-11 17:20:03 +0000
committerdim <dim@FreeBSD.org>2015-09-11 17:20:03 +0000
commit5cc32d7f18f18fb3a5f4155b7f748cc7be60d2da (patch)
tree09add9017de3c98451b1eaf85a24b608cf228e4b /etc
parenta8fd1565ce9f3593ba962863828175715c3dede0 (diff)
parent2a0c9817c795eaf2bf7607d8cc9b36975aaca160 (diff)
downloadFreeBSD-src-5cc32d7f18f18fb3a5f4155b7f748cc7be60d2da.zip
FreeBSD-src-5cc32d7f18f18fb3a5f4155b7f748cc7be60d2da.tar.gz
Merge ^/head r287527 through r287679.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.d/bgfsck15
-rwxr-xr-xetc/rc.d/jail9
-rwxr-xr-xetc/rc.d/netif2
3 files changed, 16 insertions, 10 deletions
diff --git a/etc/rc.d/bgfsck b/etc/rc.d/bgfsck
index d15744c..c1d1a4d 100755
--- a/etc/rc.d/bgfsck
+++ b/etc/rc.d/bgfsck
@@ -12,17 +12,24 @@
name="background_fsck"
rcvar="background_fsck"
start_cmd="bgfsck_start"
+start_precmd="bgfsck_start_precmd"
stop_cmd=":"
+bgfsck_start_precmd()
+{
+ if [ $($ID -u) != 0 ]; then
+ err 1 "Must be root."
+ fi
+}
+
bgfsck_start()
{
- if [ -z "${rc_force}" ]; then
- background_fsck_delay=${background_fsck_delay:-0}
- else
+ : ${background_fsck_delay=0}
+ if [ -n "${rc_force}" ]; then
background_fsck_delay=0
fi
if [ ${background_fsck_delay} -lt 0 ]; then
- echo "Background file system checks delayed indefinitely"
+ warn "Background file system checks delayed indefinitely"
return 0
fi
diff --git a/etc/rc.d/jail b/etc/rc.d/jail
index d486118..3c55edf 100755
--- a/etc/rc.d/jail
+++ b/etc/rc.d/jail
@@ -419,7 +419,7 @@ jail_status()
jail_start()
{
- local _j _jid _jl
+ local _j _jid _jl _id _name
if [ $# = 0 ]; then
return
@@ -432,10 +432,9 @@ jail_start()
command_args="-f $jail_conf -c"
_tmp=`mktemp -t jail` || exit 3
if $command $rc_flags $command_args >> $_tmp 2>&1; then
- $jail_jls jid name | while read IN; do
- set -- $IN
- echo -n " $2"
- echo $1 > /var/run/jail_$2.id
+ $jail_jls jid name | while read _id _name; do
+ echo -n " $_name"
+ echo $_id > /var/run/jail_${_name}.id
done
else
tail -1 $_tmp
diff --git a/etc/rc.d/netif b/etc/rc.d/netif
index 00e05b2..5ed9562 100755
--- a/etc/rc.d/netif
+++ b/etc/rc.d/netif
@@ -88,7 +88,7 @@ netif_start()
fi
if [ -f /etc/rc.d/routing -a -n "$cmdifn" ] ; then
for _if in $cmdifn; do
- /etc/rc.d/routing start any $_if
+ /etc/rc.d/routing static any $_if
done
fi
}
OpenPOWER on IntegriCloud