handle case of non-existence of /proc/cmdline

This commit is contained in:
Patrick Schleizer 2025-05-18 06:44:42 -04:00
parent 88235cc97b
commit 405880e63b
No known key found for this signature in database
GPG key ID: CB8D50BB77BB3C48

View file

@ -80,7 +80,9 @@ if [ "$PAM_USER" = 'sysmaint' ]; then
fi
fi
kernel_cmdline="$(cat -- /proc/cmdline)"
if test -f /proc/cmdline; then
kernel_cmdline="$(cat -- /proc/cmdline)"
fi
if [ "$PAM_USER" != 'sysmaint' ]; then
if [[ "${kernel_cmdline}" =~ 'boot-role=sysmaint' ]]; then