We no longer need SVCNAME here
This commit is contained in:
parent
c556731ad3
commit
437363a344
@ -61,7 +61,7 @@ ifplugd_pre_start() {
|
|||||||
eval args=\$ifplugd_${IFVAR}
|
eval args=\$ifplugd_${IFVAR}
|
||||||
|
|
||||||
# Mark the us as inactive so netplug can restart us
|
# Mark the us as inactive so netplug can restart us
|
||||||
mark_service_inactive "${SVCNAME}"
|
mark_service_inactive
|
||||||
|
|
||||||
# Start ifplugd
|
# Start ifplugd
|
||||||
eval start-stop-daemon --start --exec /usr/sbin/ifplugd \
|
eval start-stop-daemon --start --exec /usr/sbin/ifplugd \
|
||||||
@ -83,7 +83,7 @@ ifplugd_pre_start() {
|
|||||||
|
|
||||||
local i=0
|
local i=0
|
||||||
while true; do
|
while true; do
|
||||||
if service_started "${SVCNAME}"; then
|
if service_started; then
|
||||||
_show_address
|
_show_address
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -62,7 +62,7 @@ netplugd_pre_start() {
|
|||||||
ebegin "Starting netplug on" "${IFACE}"
|
ebegin "Starting netplug on" "${IFACE}"
|
||||||
|
|
||||||
# Mark the us as inactive so netplug can restart us
|
# Mark the us as inactive so netplug can restart us
|
||||||
mark_service_inactive "${SVCNAME}"
|
mark_service_inactive
|
||||||
|
|
||||||
# Start netplug
|
# Start netplug
|
||||||
start-stop-daemon --start --exec /sbin/netplugd \
|
start-stop-daemon --start --exec /sbin/netplugd \
|
||||||
@ -85,7 +85,7 @@ netplugd_pre_start() {
|
|||||||
|
|
||||||
local i=0
|
local i=0
|
||||||
while true; do
|
while true; do
|
||||||
if service_started "${SVCNAME}"; then
|
if service_started; then
|
||||||
_show_address
|
_show_address
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -213,7 +213,7 @@ pppd_pre_start() {
|
|||||||
[ "${insert_link_in_opts}" = "0" ] || opts="${link} ${opts}"
|
[ "${insert_link_in_opts}" = "0" ] || opts="${link} ${opts}"
|
||||||
|
|
||||||
ebegin "Starting pppd in ${IFACE}"
|
ebegin "Starting pppd in ${IFACE}"
|
||||||
mark_service_inactive "${SVCNAME}"
|
mark_service_inactive
|
||||||
if [ -n "${username}" ] \
|
if [ -n "${username}" ] \
|
||||||
&& [ -n "${password}" -o -z "${passwordset}" ]; then
|
&& [ -n "${password}" -o -z "${passwordset}" ]; then
|
||||||
printf "%s" "${password}" | \
|
printf "%s" "${password}" | \
|
||||||
@ -225,7 +225,7 @@ pppd_pre_start() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! eend $? "Failed to start PPP"; then
|
if ! eend $? "Failed to start PPP"; then
|
||||||
mark_service_stopped "net.${IFACE}"
|
mark_service_stopped
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ wpa_supplicant_pre_start() {
|
|||||||
opts="${opts} -W"
|
opts="${opts} -W"
|
||||||
else
|
else
|
||||||
sleep 2 # FBSD 7.0 beta2 bug
|
sleep 2 # FBSD 7.0 beta2 bug
|
||||||
mark_service_inactive "${SVCNAME}"
|
mark_service_inactive
|
||||||
fi
|
fi
|
||||||
start-stop-daemon --start --exec "${wpas}" \
|
start-stop-daemon --start --exec "${wpas}" \
|
||||||
--pidfile "/var/run/wpa_supplicant-${IFACE}.pid" \
|
--pidfile "/var/run/wpa_supplicant-${IFACE}.pid" \
|
||||||
@ -157,8 +157,8 @@ wpa_supplicant_pre_start() {
|
|||||||
# Starting wpa_supplication-0.4.0, we can get wpa_cli to
|
# Starting wpa_supplication-0.4.0, we can get wpa_cli to
|
||||||
# start/stop our scripts from wpa_supplicant messages
|
# start/stop our scripts from wpa_supplicant messages
|
||||||
local inact=false
|
local inact=false
|
||||||
service_inactive "${SVCNAME}" && inact=true
|
service_inactive && inact=true
|
||||||
mark_service_inactive "${SVCNAME}"
|
mark_service_inactive
|
||||||
|
|
||||||
ebegin "Starting wpa_cli on" "${IFACE}"
|
ebegin "Starting wpa_cli on" "${IFACE}"
|
||||||
start-stop-daemon --start --exec "${wpac}" \
|
start-stop-daemon --start --exec "${wpac}" \
|
||||||
@ -173,7 +173,7 @@ wpa_supplicant_pre_start() {
|
|||||||
# wpa_cli failed to start? OK, error here
|
# wpa_cli failed to start? OK, error here
|
||||||
start-stop-daemon --quiet --stop --exec "${wpas}" \
|
start-stop-daemon --quiet --stop --exec "${wpas}" \
|
||||||
--pidfile "/var/run/wpa_supplicant-${IFACE}.pid"
|
--pidfile "/var/run/wpa_supplicant-${IFACE}.pid"
|
||||||
${inact} || mark_service_stopped "${SVCNAME}"
|
${inact} || mark_service_stopped
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user