BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')"
BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}"
- BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}"
+ BOOT_IMAGE_PATH="${BOOT_IMAGE%"${BOOT_IMAGE_NAME}"}"
if [ -z "$BOOT_IMAGE_NAME" ]; then
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
# routing,dns,dhcp-options,etc.
#
+# we really need to use `expr substr` with dash
+# shellcheck disable=SC2003 disable=SC2308
+
command -v getarg > /dev/null || . /lib/dracut-lib.sh
if [ -n "$netroot" ] && [ -z "$(getarg ip=)" ] && [ -z "$(getarg BOOTIF=)" ]; then
#!/bin/sh
# we really need to use `expr substr` with dash
-# shellcheck disable=SC2003
+# shellcheck disable=SC2003 disable=SC2308
MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=)
# normalize the uuid
# strip nfs[4]:
local arg="$*:"
nfs="${arg%%:*}"
- arg="${arg##$nfs:}"
+ arg="${arg##"$nfs":}"
# check if we have a server
if strstr "$arg" ':/'; then
path="${arg%%:*}"
# rest are options
- options="${arg##$path}"
+ options="${arg##"$path"}"
# strip leading ":"
options="${options##:}"
# strip ":"