Use yesno for more robustness
This commit is contained in:
parent
5f37abddde
commit
a1b9dabf4e
@ -63,7 +63,7 @@ check_statedir() {
|
|||||||
#splash "critical" &
|
#splash "critical" &
|
||||||
echo
|
echo
|
||||||
eerror "To function properly, \"$1\" needs to exist."
|
eerror "To function properly, \"$1\" needs to exist."
|
||||||
if [ "${RC_FORCE_AUTO}" = "yes" ] ; then
|
if yesno ${RC_FORCE_AUTO}; then
|
||||||
eerror "Attempting to create \"$1\" for you ..."
|
eerror "Attempting to create \"$1\" for you ..."
|
||||||
mount -o remount,rw /
|
mount -o remount,rw /
|
||||||
mkdir -p "$1"
|
mkdir -p "$1"
|
||||||
|
@ -118,7 +118,7 @@ _wait_for_carrier() {
|
|||||||
# Incase users don't want this nice feature ...
|
# Incase users don't want this nice feature ...
|
||||||
[ ${timeout} -le 0 ] && return 0
|
[ ${timeout} -le 0 ] && return 0
|
||||||
|
|
||||||
[ "${RC_PARALLEL}" = "yes" ] && efunc=einfo
|
yesno ${RC_PARALLEL} && efunc=einfo
|
||||||
${efunc} "Waiting for carrier (${timeout} seconds) "
|
${efunc} "Waiting for carrier (${timeout} seconds) "
|
||||||
while [ ${timeout} -gt 0 ] ; do
|
while [ ${timeout} -gt 0 ] ; do
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
|
|
||||||
if [ "${RC_NOCOLOR}" = "yes" ] ; then
|
if yesno ${RC_NOCOLOR}; then
|
||||||
unset BLUE GREEN OFF CYAN
|
unset BLUE GREEN OFF CYAN
|
||||||
else
|
else
|
||||||
BLUE="\033[34;01m"
|
BLUE="\033[34;01m"
|
||||||
@ -61,7 +61,7 @@ printf "Usage: ${CYAN}${SERVICE}${OFF} [ ${GREEN}flags${OFF} ] < ${GREEN}options
|
|||||||
|
|
||||||
${CYAN}Normal Commands:${OFF}"
|
${CYAN}Normal Commands:${OFF}"
|
||||||
|
|
||||||
if [ "${BE_VERBOSE}" = "yes" ] ; then
|
if yesno ${BE_VERBOSE}; then
|
||||||
printf "
|
printf "
|
||||||
${GREEN}describe${OFF}
|
${GREEN}describe${OFF}
|
||||||
Describe what the service and any extra options do.
|
Describe what the service and any extra options do.
|
||||||
@ -142,7 +142,7 @@ ${CYAN}Flags:${OFF}${NL}
|
|||||||
${GREEN}--nocolor${OFF} Suppress the use of colors
|
${GREEN}--nocolor${OFF} Suppress the use of colors
|
||||||
"
|
"
|
||||||
|
|
||||||
if [ "${BE_VERBOSE}" = "yes" ] ; then
|
if yesno ${BE_VERBOSE}; then
|
||||||
printf "
|
printf "
|
||||||
${CYAN}Dependencies:${OFF}
|
${CYAN}Dependencies:${OFF}
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ printf "
|
|||||||
${CYAN}Configuration files:${OFF}
|
${CYAN}Configuration files:${OFF}
|
||||||
"
|
"
|
||||||
|
|
||||||
if [ "${BE_VERBOSE}" = "yes" ] ; then
|
if yesno ${BE_VERBOSE}; then
|
||||||
printf "
|
printf "
|
||||||
There are two files which will be sourced for possible configuration by
|
There are two files which will be sourced for possible configuration by
|
||||||
the rc-scripts. They are (sourced from left to right, top to bottom):
|
the rc-scripts. They are (sourced from left to right, top to bottom):
|
||||||
@ -259,7 +259,7 @@ printf " /etc/conf.d/rc
|
|||||||
/etc/rc.conf
|
/etc/rc.conf
|
||||||
\${RC_SOFTLEVEL} denotes the name of the runlevel"
|
\${RC_SOFTLEVEL} denotes the name of the runlevel"
|
||||||
|
|
||||||
if [ "${BE_VERBOSE}" = "yes" ] ; then
|
if yesno ${BE_VERBOSE}; then
|
||||||
printf "
|
printf "
|
||||||
You can add extra dependencies to ${SERVICE} by adding some variables to
|
You can add extra dependencies to ${SERVICE} by adding some variables to
|
||||||
/etc/conf.d/${SERVICE}
|
/etc/conf.d/${SERVICE}
|
||||||
@ -273,7 +273,7 @@ printf "
|
|||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${BE_VERBOSE}" = "yes" ] ; then
|
if yesno ${BE_VERBOSE}; then
|
||||||
printf "\n
|
printf "\n
|
||||||
${CYAN}Management:${OFF}
|
${CYAN}Management:${OFF}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ describe() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
[ "${RC_DEBUG}" = "yes" ] && set -x
|
yesno ${RC_DEBUG} && set -x
|
||||||
|
|
||||||
# If we're net.eth0 or openvpn.work then load net or openvpn config
|
# If we're net.eth0 or openvpn.work then load net or openvpn config
|
||||||
rc_c=${SVCNAME%%.*}
|
rc_c=${SVCNAME%%.*}
|
||||||
|
Loading…
Reference in New Issue
Block a user