Skip to content

Commit cee996a

Browse files
quote vars in test -n
Signed-off-by: Andrew Ammerlaan <[email protected]>
1 parent 4fa52b4 commit cee996a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

hooks/50-dracut.install

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ main() {
3131
# re-define for subst to work
3232
[[ -n ${NOCOLOR+yes} ]] && NOCOLOR=
3333

34-
if [[ -n ${INSTALLKERNEL_INITRD_GENERATOR} &&
34+
if [[ -n "${INSTALLKERNEL_INITRD_GENERATOR}" &&
3535
${INSTALLKERNEL_INITRD_GENERATOR} != dracut ]]; then
3636
# We are not selected as the initrd generator
3737
exit 0

hooks/60-ukify.install

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ main() {
3737
# re-define for subst to work
3838
[[ -n ${NOCOLOR+yes} ]] && NOCOLOR=
3939

40-
if [[ -n ${INSTALLKERNEL_UKI_GENERATOR} &&
40+
if [[ -n "${INSTALLKERNEL_UKI_GENERATOR}" &&
4141
${INSTALLKERNEL_UKI_GENERATOR} != ukify ]]; then
4242
# We are not selected as the uki generator
4343
exit 0
4444
fi
4545

46-
if [[ -n ${INSTALLKERNEL_LAYOUT} && ${INSTALLKERNEL_LAYOUT} != uki ]]; then
46+
if [[ -n "${INSTALLKERNEL_LAYOUT}" && ${INSTALLKERNEL_LAYOUT} != uki ]]; then
4747
exit 0
4848
fi
4949

hooks/systemd/95-efistub-kernel-bootcfg.install

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [[ ${KERNEL_INSTALL_LAYOUT} == "uki" ]]; then
2727
fi
2828

2929
PARTLABEL="$(df ${UKI} --output=source | tail -1 | xargs -r lsblk --output=PARTLABEL --noheadings)"
30-
if [[ -n ${PARTLABEL} ]]; then
30+
if [[ -n "${PARTLABEL}" ]]; then
3131
TITLE="${KERNEL_VERSION} (UKI) on ${PARTLABEL}"
3232
else
3333
TITLE="${KERNEL_VERSION} (UKI)"
@@ -74,12 +74,12 @@ elif [[ ${KERNEL_INSTALL_LAYOUT} == "efistub" ]]; then
7474
BOOT_OPTIONS="${BOOT_OPTIONS} initrd=${INITRD_EFI_PATH_DOS}"
7575
fi
7676

77-
if [[ -n ${BOOT_OPTIONS} ]]; then
77+
if [[ -n "${BOOT_OPTIONS}" ]]; then
7878
KERNEL_BOOTCFG_ARGS+=( --cmdline "${BOOT_OPTIONS}" )
7979
fi
8080

8181
PARTLABEL="$(df ${KERNEL_IMAGE} --output=source | tail -1 | xargs -r lsblk --output=PARTLABEL --noheadings)"
82-
if [[ -n ${PARTLABEL} ]]; then
82+
if [[ -n "${PARTLABEL}" ]]; then
8383
TITLE="${KERNEL_VERSION} (plain) on ${PARTLABEL}"
8484
else
8585
TITLE="${KERNEL_VERSION} (plain)"

0 commit comments

Comments
 (0)