misc BSD fixes
This commit is contained in:
parent
872a31b215
commit
41c00eda37
@ -67,7 +67,7 @@ start() {
|
|||||||
local ttyv=
|
local ttyv=
|
||||||
for ttyv in /dev/ttyv*; do
|
for ttyv in /dev/ttyv*; do
|
||||||
vidcontrol < "${ttyv}" ${MOUSE_CHAR_START} -m on
|
vidcontrol < "${ttyv}" ${MOUSE_CHAR_START} -m on
|
||||||
: $((${retval} += $?))
|
: $((retval+= $?))
|
||||||
done
|
done
|
||||||
|
|
||||||
eend ${retval} "Failed to start moused"
|
eend ${retval} "Failed to start moused"
|
||||||
|
@ -31,6 +31,7 @@ name="Power Control Daemon"
|
|||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need localmount
|
need localmount
|
||||||
|
use logger
|
||||||
after bootmisc
|
after bootmisc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,20 +35,38 @@ start() {
|
|||||||
[ -x "$svc" ] || continue
|
[ -x "$svc" ] || continue
|
||||||
service=$(basename ${svc})
|
service=$(basename ${svc})
|
||||||
|
|
||||||
|
# Skip these services
|
||||||
|
for s in cleartmp moused; do
|
||||||
|
[ "${s}" = "${service}" ] && continue 2
|
||||||
|
done
|
||||||
|
|
||||||
# If we have an init script for this service, continue
|
# If we have an init script for this service, continue
|
||||||
[ -x /etc/init.d/${svc} ]] && continue
|
[ -x /etc/init.d/"${service}" ] && continue
|
||||||
[ -x /usr/local/etc/init.d/${svc} ] && continue
|
[ -x /usr/local/etc/init.d/"${service}" ] && continue
|
||||||
|
|
||||||
# Ensure that the users rc.conf will start us - ignore the defaults
|
# Ensure that the users rc.conf will start us - ignore the defaults
|
||||||
eval enabled=\$$(basename ${svc})_enabled
|
eval enabled=\$$(basename "${svc}")_enable
|
||||||
case "$enabled" in
|
case "$enabled" in
|
||||||
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;;
|
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;;
|
||||||
*) continue ;;
|
*) continue ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Good to go!
|
# Good to go!
|
||||||
"$svc" start
|
"$svc" start && started="${started} ${svc}"
|
||||||
: $((retval += $?))
|
: $((retval += $?))
|
||||||
done
|
done
|
||||||
eend $retval "Some local rc services failed to start"
|
save_options started "${started}"
|
||||||
|
eend $retval "Some local rc services failed to start"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping local rc services"
|
||||||
|
local svc= retval=0
|
||||||
|
for svc in $(rcorder $(get_options started) 2>/dev/null | sort -r); do
|
||||||
|
"${svc}" stop
|
||||||
|
: $((retval += $?))
|
||||||
|
done
|
||||||
|
eend $retval "Some local rc services failed to stop"
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -29,11 +29,10 @@ depend() {
|
|||||||
|
|
||||||
start() {
|
start() {
|
||||||
if [ -n "${MODE}" ]; then
|
if [ -n "${MODE}" ]; then
|
||||||
ebegin "Setting mode to ${MODE}"
|
ebegin "Setting mode to ${MODE} for all screens"
|
||||||
local tty=
|
for v in /dev/ttyv*; do
|
||||||
for tty in /dev/tty*; do
|
[ -c "${v}" ] || continue
|
||||||
[ -e "${tty}" ] || continue
|
vidcontrol "${MODE}" <"${v}"
|
||||||
vidcontrol "${MODE}" <"${tty}" >"${tty}" 2>&1
|
|
||||||
done
|
done
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
@ -96,7 +95,8 @@ start() {
|
|||||||
if [ -n "${KBDFLAGS}" ]; then
|
if [ -n "${KBDFLAGS}" ]; then
|
||||||
ebegin "Setting keyboard flags for all screens"
|
ebegin "Setting keyboard flags for all screens"
|
||||||
for v in /dev/ttyv*; do
|
for v in /dev/ttyv*; do
|
||||||
kbdcontrol ${KBDFLAGS} <${v} &>${v}
|
[ -c "${v}" ] || continue
|
||||||
|
kbdcontrol ${KBDFLAGS} <"${v}"
|
||||||
done
|
done
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user