aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2025-06-27 18:59:41 +0000
committerMark Johnston <markj@FreeBSD.org>2025-06-27 20:18:24 +0000
commitd783591a7debc75045e8fbb7c57622c6fda2da01 (patch)
treed9f833547ca1a40d6140cc9254fada81e98f265a /libexec
parent0726c6574f889507e5030173bf4c82c80911394d (diff)
Diffstat (limited to 'libexec')
-rwxr-xr-xlibexec/rc/rc.d/moused2
-rwxr-xr-xlibexec/rc/rc.d/syscons4
-rw-r--r--libexec/rc/rc.subr24
3 files changed, 7 insertions, 23 deletions
diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused
index 9bb1a5cedc31..6f1b95af0f0a 100755
--- a/libexec/rc/rc.d/moused
+++ b/libexec/rc/rc.d/moused
@@ -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
}
diff --git a/libexec/rc/rc.d/syscons b/libexec/rc/rc.d/syscons
index 7ad9b720e454..325628a83d8c 100755
--- a/libexec/rc/rc.d/syscons
+++ b/libexec/rc/rc.d/syscons
@@ -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
diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr
index d760b75a15a3..359eebd1d342 100644
--- a/libexec/rc/rc.subr
+++ b/libexec/rc/rc.subr
@@ -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