From: наб Date: Sat, 14 May 2022 13:07:04 +0000 (+0200) Subject: kernel-install: 90-loaderentry: remove shopt X-Git-Tag: v251~31^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=003c81b26c65bb960b595ccad783d9994326178e;p=thirdparty%2Fsystemd.git kernel-install: 90-loaderentry: remove shopt Fixes: #23374 Fixes: 367165a4069ac0c04882a05a8a80f6afb1e42760 --- diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install index 0e57df775f5..9faf19814a7 100644 --- a/src/kernel-install/90-loaderentry.install +++ b/src/kernel-install/90-loaderentry.install @@ -18,8 +18,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . -shopt -s nullglob - COMMAND="$1" KERNEL_VERSION="$2" ENTRY_DIR_ABS="$3" @@ -105,9 +103,10 @@ install -g root -o root -m 0644 "$KERNEL_IMAGE" "$ENTRY_DIR_ABS/linux" || { } shift "$INITRD_OPTIONS_SHIFT" -# All files listed as arguments, and staged files called "initrd*" are installed as initrds. +# All files listed as arguments, and staged files starting with "initrd" are installed as initrds. for initrd in "$@" "${KERNEL_INSTALL_STAGING_AREA}"/initrd*; do [ -f "$initrd" ] || { + [ "$initrd" = "${KERNEL_INSTALL_STAGING_AREA}/initrd*" ] && continue echo "Error: initrd '$initrd' not a file." >&2 exit 1 } @@ -139,6 +138,7 @@ mkdir -p "${LOADER_ENTRY%/*}" || { have_initrd= for initrd in "${@}" "${KERNEL_INSTALL_STAGING_AREA}"/initrd*; do + [ -f "$initrd" ] || continue echo "initrd $ENTRY_DIR/${initrd##*/}" have_initrd=yes done