security-misc/etc/initramfs-tools/scripts/init-bottom/sysctl-initramfs

27 lines
624 B
Plaintext
Raw Normal View History

2020-01-12 16:37:37 -05:00
#!/bin/sh
2022-05-20 14:46:38 -04:00
## Copyright (C) 2012 - 2022 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
2020-01-12 16:37:37 -05:00
## See the file COPYING for copying conditions.
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
## Write to '/run/initramfs' folder.
## https://forums.whonix.org/t/kernel-hardening/7296/435
2020-04-16 07:24:44 -04:00
sysctl -p ${rootmnt}/etc/sysctl.conf >/dev/null 2> "/run/initramfs/sysctl-initramfs-error.log"
sysctl -p ${rootmnt}/etc/sysctl.d/*.conf >/dev/null 2>> "/run/initramfs/sysctl-initramfs-error.log"
2020-04-16 07:24:44 -04:00
grep -v "unprivileged_userfaultfd" "/run/initramfs/sysctl-initramfs-error.log"
2020-01-15 15:54:06 -05:00
true