Skip to content

Commit

Permalink
fix: shellcheck 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aafeijoo-suse authored and johannbg committed Jan 4, 2023
1 parent 9333944 commit 88fe920
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules.d/01fips/fips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ do_fips() {
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}"
Expand Down
3 changes: 3 additions & 0 deletions modules.d/35network-legacy/parse-ip-opts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# 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
Expand Down
2 changes: 1 addition & 1 deletion modules.d/90mdraid/parse-md.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/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
Expand Down
4 changes: 2 additions & 2 deletions modules.d/95nfs/nfs-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ nfsroot_to_var() {
# strip nfs[4]:
local arg="$*:"
nfs="${arg%%:*}"
arg="${arg##$nfs:}"
arg="${arg##"$nfs":}"

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

# rest are options
options="${arg##$path}"
options="${arg##"$path"}"
# strip leading ":"
options="${options##:}"
# strip ":"
Expand Down

0 comments on commit 88fe920

Please sign in to comment.