mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-11-26 00:46:56 -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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
kernel_cmdline=""
|
kernel_cmdline=''
|
||||||
if test -f /proc/cmdline; then
|
if [ -f /proc/cmdline ]; then
|
||||||
kernel_cmdline="$(cat -- /proc/cmdline)"
|
kernel_cmdline="$(cat -- /proc/cmdline)" || true
|
||||||
|
elif [ -f /proc/1/cmdline ]; then
|
||||||
|
kernel_cmdline="$(cat -- /proc/1/cmdline)" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PAM_USER" != 'sysmaint' ]; then
|
if [ "$PAM_USER" != 'sysmaint' ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue