Skip to content

Commit 88fe920

Browse files
aafeijoo-susejohannbg
authored andcommitted
fix: shellcheck 0.8.0
1 parent 9333944 commit 88fe920

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

modules.d/01fips/fips.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ do_fips() {
143143
BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')"
144144

145145
BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}"
146-
BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}"
146+
BOOT_IMAGE_PATH="${BOOT_IMAGE%"${BOOT_IMAGE_NAME}"}"
147147

148148
if [ -z "$BOOT_IMAGE_NAME" ]; then
149149
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"

modules.d/35network-legacy/parse-ip-opts.sh

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# routing,dns,dhcp-options,etc.
1313
#
1414

15+
# we really need to use `expr substr` with dash
16+
# shellcheck disable=SC2003 disable=SC2308
17+
1518
command -v getarg > /dev/null || . /lib/dracut-lib.sh
1619

1720
if [ -n "$netroot" ] && [ -z "$(getarg ip=)" ] && [ -z "$(getarg BOOTIF=)" ]; then

modules.d/90mdraid/parse-md.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
# we really need to use `expr substr` with dash
3-
# shellcheck disable=SC2003
3+
# shellcheck disable=SC2003 disable=SC2308
44

55
MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=)
66
# normalize the uuid

modules.d/95nfs/nfs-lib.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ nfsroot_to_var() {
3636
# strip nfs[4]:
3737
local arg="$*:"
3838
nfs="${arg%%:*}"
39-
arg="${arg##$nfs:}"
39+
arg="${arg##"$nfs":}"
4040

4141
# check if we have a server
4242
if strstr "$arg" ':/'; then
@@ -47,7 +47,7 @@ nfsroot_to_var() {
4747
path="${arg%%:*}"
4848

4949
# rest are options
50-
options="${arg##$path}"
50+
options="${arg##"$path"}"
5151
# strip leading ":"
5252
options="${options##:}"
5353
# strip ":"

0 commit comments

Comments
 (0)