summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-22 07:24:31 -0300
committerRenato Botelho <renato@netgate.com>2015-09-22 07:24:31 -0300
commitb5a91a37da44408c68a25426a16a8ca84686f054 (patch)
tree5761589f6059a9c8a3df1d4aed7e7972e6b1c431 /etc
parent8400c0790e456038fbca4995d032d4e3d44c3d31 (diff)
parent0f328f755ef12f6cb68a753ed5e48e934002a2b8 (diff)
downloadFreeBSD-src-b5a91a37da44408c68a25426a16a8ca84686f054.zip
FreeBSD-src-b5a91a37da44408c68a25426a16a8ca84686f054.tar.gz
Merge branch 'stable/10' into devel
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 101577e..008ec08 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 ea62f48..d1307db 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 daece80..d8998e5 100755
--- a/etc/rc.d/netif
+++ b/etc/rc.d/netif
@@ -85,7 +85,7 @@ network_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