scripts: add quotes to paths

This commit is contained in:
bol-van
2024-08-25 18:04:11 +03:00
parent 6276d92ffb
commit 15751976e0
5 changed files with 5 additions and 5 deletions

View File

@@ -154,7 +154,7 @@ linux_get_subsys()
local INIT="$(sed 's/\x0/\n/g' /proc/1/cmdline | head -n 1)"
[ -L "$INIT" ] && INIT=$(readlink "$INIT")
INIT=$(basename "$INIT")
INIT="$(basename "$INIT")"
if [ -f "/etc/openwrt_release" ] && [ "$INIT" = "procd" ] ; then
SUBSYS=openwrt
elif [ -x "/bin/ndm" ] ; then

View File

@@ -89,7 +89,7 @@ check_system()
# do not use 'exe' because it requires root
local INIT="$(sed 's/\x0/\n/g' /proc/1/cmdline | head -n 1)"
[ -L "$INIT" ] && INIT=$(readlink "$INIT")
INIT=$(basename "$INIT")
INIT="$(basename "$INIT")"
# some distros include systemctl without systemd
if [ -d "$SYSTEMD_DIR" ] && [ -x "$SYSTEMCTL" ] && [ "$INIT" = "systemd" ]; then
SYSTEM=systemd

View File

@@ -117,7 +117,7 @@ resolve_lower_devices()
{
local l lower lowers
while read lower; do
lower=$(basename "$lower")
lower="$(basename "$lower")"
l="${lower#lower_*}"
[ "$l" != "$lower" ] && append_separator_list lowers ' ' '' "$l"
done