mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-11-25 15:07:11 -05:00
more robust, standardized kernel_cmdline variable detection
This commit is contained in:
parent
53db631964
commit
cb70f19837
1 changed files with 5 additions and 3 deletions
|
|
@ -111,9 +111,11 @@ if [ "$PAM_USER" = 'sysmaint' ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
kernel_cmdline=""
|
||||
if test -f /proc/cmdline; then
|
||||
kernel_cmdline="$(cat -- /proc/cmdline)"
|
||||
kernel_cmdline=''
|
||||
if [ -f /proc/cmdline ]; then
|
||||
kernel_cmdline="$(cat -- /proc/cmdline)" || true
|
||||
elif [ -f /proc/1/cmdline ]; then
|
||||
kernel_cmdline="$(cat -- /proc/1/cmdline)" || true
|
||||
fi
|
||||
|
||||
if [ "$PAM_USER" != 'sysmaint' ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue