Revert "rc: Fix scripts that need pathname expansion"

The commit which motivated this is being reverted.

This reverts commit 7faddeb395.
This commit is contained in:
Mark Johnston 2025-06-27 18:59:41 +00:00
parent 0726c6574f
commit d783591a7d
3 changed files with 7 additions and 23 deletions

View file

@ -69,7 +69,7 @@ moused_start()
;;
esac
for ttyv in $(expandpath "/dev/ttyv*"); do
for ttyv in /dev/ttyv* ; do
vidcontrol < ${ttyv} ${mousechar_arg} -m on
done
}

View file

@ -237,7 +237,7 @@ syscons_configure_keyboard()
if [ -n "${allscreens_kbdflags}" ]; then
sc_init
echo -n ' allscreens_kbd'
for ttyv in $(expandpath "/dev/ttyv*"); do
for ttyv in /dev/ttyv*; do
kbdcontrol ${allscreens_kbdflags} < ${ttyv} > ${ttyv} 2>&1
done
fi
@ -381,7 +381,7 @@ syscons_start()
if [ -n "${allscreens_flags}" ]; then
sc_init
echo -n ' allscreens'
for ttyv in $(expandpath "/dev/ttyv*"); do
for ttyv in /dev/ttyv*; do
vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
done
fi

View file

@ -223,11 +223,10 @@ rc_trace()
list_vars()
{
# Localize 'set' option below.
local - _s
local -
local IFS=$'\n' line varname
# Disable path expansion temporarily in unquoted 'for' parameters below.
_s=$(set +o)
# Disable path expansion in unquoted 'for' parameters below.
set -o noglob
for line in $(set); do
@ -242,7 +241,6 @@ list_vars()
;;
esac
done
eval $_s
}
# set_rcvar [var] [defval] [desc]
@ -294,19 +292,6 @@ set_rcvar_obsolete()
eval ${_var}_obsolete_msg=\"$*\"
}
# expandpath str
# Apply pathname expansion to str.
#
expandpath()
{
local _s
_s=$(set +o)
set +o noglob
echo $1
eval $_s
}
#
# force_depend script [rcvar]
# Force a service to start. Intended for use by services
@ -1798,19 +1783,18 @@ _run_rc_setup()
_run_rc_doit()
{
local _m _s
local _m
debug "run_rc_command: doit: $*"
_m=$(umask)
${_umask:+umask ${_umask}}
# Disable pathname expansion temporarily for run_rc_command.
_s=$(set +o)
set -o noglob
eval "$@"
set +o noglob
_return=$?
umask ${_m}
eval $_s
# If command failed and force isn't set, request exit.
if [ $_return -ne 0 ] && [ -z "$rc_force" ]; then