mdconfig (252310) | mdconfig (264243) |
---|---|
1#!/bin/sh 2# 3# Copyright (c) 2006 The FreeBSD Project 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1#!/bin/sh 2# 3# Copyright (c) 2006 The FreeBSD Project 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/etc/rc.d/mdconfig 252310 2013-06-27 18:28:45Z hrs $ | 27# $FreeBSD: head/etc/rc.d/mdconfig 264243 2014-04-07 22:40:29Z dteske $ |
28# 29 30# PROVIDE: mdconfig 31# REQUIRE: swap root 32 33. /etc/rc.subr 34 35name="mdconfig" --- 140 unchanged lines hidden (view full) --- 176_mdconfig_cmd="$1" 177if [ $# -gt 0 ]; then 178 shift 179fi 180[ -n "$*" ] && _mdconfig_list="$*" 181 182load_rc_config $name 183 | 28# 29 30# PROVIDE: mdconfig 31# REQUIRE: swap root 32 33. /etc/rc.subr 34 35name="mdconfig" --- 140 unchanged lines hidden (view full) --- 176_mdconfig_cmd="$1" 177if [ $# -gt 0 ]; then 178 shift 179fi 180[ -n "$*" ] && _mdconfig_list="$*" 181 182load_rc_config $name 183 |
184_mdconfig_unit=0 | |
185if [ -z "${_mdconfig_list}" ]; then | 184if [ -z "${_mdconfig_list}" ]; then |
186 while :; do 187 eval _mdconfig_config=\$mdconfig_md${_mdconfig_unit} 188 if [ -z "${_mdconfig_config}" ]; then 189 break 190 else 191 _mdconfig_list="${_mdconfig_list}${_mdconfig_list:+ }md${_mdconfig_unit}" 192 _mdconfig_unit=$((${_mdconfig_unit} + 1)) 193 fi | 185 for _mdconfig_config in `list_vars mdconfig_md[0-9]\* | 186 sort_lite -nk1.12` 187 do 188 _mdconfig_unit=${_mdconfig_config#mdconfig_md} 189 _mdconfig_list="$_mdconfig_list md$_mdconfig_unit" |
194 done | 190 done |
191 _mdconfig_list="${_mdconfig_list# }" |
|
195fi 196 197run_rc_command "${_mdconfig_cmd}" | 192fi 193 194run_rc_command "${_mdconfig_cmd}" |