mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-13 04:44:23 -05:00
31 lines
805 B
Bash
Executable File
31 lines
805 B
Bash
Executable File
#!/bin/sh
|
|
|
|
## Copyright (C) 2012 - 2019 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
|
|
## See the file COPYING for copying conditions.
|
|
|
|
PREREQ=""
|
|
prereqs()
|
|
{
|
|
echo "$PREREQ"
|
|
}
|
|
case $1 in
|
|
prereqs)
|
|
prereqs
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
## ${rootmnt} is mounted read-only in the initramfs so it needs to be remounted first.
|
|
if mount | grep "${rootmnt}" | grep -q "(ro,"; then
|
|
remount="yes"
|
|
mount -o remount,rw "${rootmnt}"
|
|
fi
|
|
sysctl -p ${rootmnt}/etc/sysctl.conf >/dev/null 2> "${rootmnt}/var/log/sysctl-initramfs-error.log"
|
|
sysctl -p ${rootmnt}/etc/sysctl.d/*.conf >/dev/null 2>> "${rootmnt}/var/log/sysctl-initramfs-error.log"
|
|
if [ "${remount}" = "yes" ]; then
|
|
mount -o remount,ro "${rootmnt}"
|
|
fi
|
|
grep -v "unprivileged_userfaultfd" "${rootmnt}/var/log/sysctl-initramfs-error.log"
|
|
|
|
true
|