mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-09-26 10:40:54 -04:00
handle case of non-existence of /proc/cmdline
This commit is contained in:
parent
88235cc97b
commit
405880e63b
1 changed files with 3 additions and 1 deletions
|
@ -80,7 +80,9 @@ if [ "$PAM_USER" = 'sysmaint' ]; then
|
||||||
fi
|
fi
|
||||||
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 [ "$PAM_USER" != 'sysmaint' ]; then
|
||||||
if [[ "${kernel_cmdline}" =~ 'boot-role=sysmaint' ]]; then
|
if [[ "${kernel_cmdline}" =~ 'boot-role=sysmaint' ]]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue