2020-01-12 16:37:37 -05:00
|
|
|
#!/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
|
|
|
|
|
2020-03-21 13:15:25 -04:00
|
|
|
## ${rootmnt} is mounted read-only in the initramfs so it needs to be remounted first.
|
2020-03-21 13:49:07 -04:00
|
|
|
if mount | grep "${rootmnt}" | grep -q "(ro,"; then
|
|
|
|
remount="yes"
|
|
|
|
mount -o remount,rw "${rootmnt}"
|
|
|
|
fi
|
2020-03-08 13:49:12 -04:00
|
|
|
sysctl -p ${rootmnt}/etc/sysctl.conf >/dev/null 2>${rootmnt}/var/log/sysctl-initramfs-error.log
|
2020-03-21 13:49:07 -04:00
|
|
|
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
|
2020-03-21 13:15:25 -04:00
|
|
|
grep -v "unprivileged_userfaultfd" "${rootmnt}/var/log/sysctl-initramfs-error.log"
|
2020-01-15 15:54:06 -05:00
|
|
|
|
|
|
|
true
|