66# plugin is run when the systemd USE flag is enabled or
77# SYSTEMD_KERNEL_INSTALL=1 is set in the environment.
88
9- [ " ${1:? } " == " add" ] || exit 0
9+ [ " ${1:? } " = " add" ] || exit 0
1010
1111_test_dracut_cmdline () {
1212 [ -e " /etc/cmdline" ] && return 1
1313
14- local _i
1514 for _i in /etc/cmdline.d/* .conf; do
1615 [ -e " ${_i} " ] && return 1
1716 done
@@ -45,7 +44,6 @@ _test_kernel_cmdline() {
4544}
4645
4746_test_uki_cmdline () {
48- local _i
4947 for _i in " ${KERNEL_INSTALL_CONF_ROOT} /uki.conf" \
5048 " /etc/kernel/uki.conf" \
5149 " /run/kernel/uki.conf" \
@@ -56,12 +54,13 @@ _test_uki_cmdline() {
5654 fi
5755 done
5856 return 0
57+ }
5958
6059if [ " $( stat -c %d:%i /) " != " $( stat -c %d:%i /proc/1/root/.) " ]; then
6160 [ " ${KERNEL_INSTALL_VERBOSE} " -gt 0 ] && \
6261 echo " Chroot detected"
6362
64- if [ " ${KERNEL_INSTALL_INITRD_GENERATOR} " == " dracut" ] && [ " ${# } " -lt 5 ]; then
63+ if [ " ${KERNEL_INSTALL_INITRD_GENERATOR} " = " dracut" ] && [ " ${# } " -lt 5 ]; then
6564 if [ " ${KERNEL_INSTALL_IMAGE_TYPE} " != " uki" ] && _test_dracut_cmdline; then
6665 echo " "
6766 echo " WARNING: Dracut will be run from inside a chroot but no"
@@ -76,7 +75,7 @@ if [ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]; then
7675 fi
7776 fi
7877
79- if [ " ${KERNEL_INSTALL_LAYOUT} " == " bls" ]; then
78+ if [ " ${KERNEL_INSTALL_LAYOUT} " = " bls" ]; then
8079 if _test_kernel_cmdline; then
8180 echo " WARNING: kernel-install is run from inside a chroot but"
8281 echo " no cmdline was configured. This would cause the bootloader"
@@ -88,8 +87,8 @@ if [ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]; then
8887 echo " "
8988 exit 1
9089 fi
91- elif [ " ${KERNEL_INSTALL_LAYOUT} " == " uki" ] && \
92- [ " ${KERNEL_INSTALL_UKI_GENERATOR} " == " ukify" ]; then
90+ elif [ " ${KERNEL_INSTALL_LAYOUT} " = " uki" ] && \
91+ [ " ${KERNEL_INSTALL_UKI_GENERATOR} " = " ukify" ]; then
9392 if _test_kernel_cmdline && _test_uki_cmdline; then
9493 echo " WARNING: Ukify will be run from inside a chroot but no"
9594 echo " cmdline for ukify was configured. Ukify would fallback"
0 commit comments