2020-01-13 04:37:37 +07:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-04-01 19:49:59 +07:00
|
|
|
## Copyright (C) 2012 - 2020 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
|
2020-01-13 04:37:37 +07:00
|
|
|
## See the file COPYING for copying conditions.
|
|
|
|
|
|
|
|
PREREQ=""
|
|
|
|
prereqs()
|
|
|
|
{
|
|
|
|
echo "$PREREQ"
|
|
|
|
}
|
|
|
|
case $1 in
|
|
|
|
prereqs)
|
|
|
|
prereqs
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2020-03-22 00:15:25 +07:00
|
|
|
## ${rootmnt} is mounted read-only in the initramfs so it needs to be remounted first.
|
2020-03-22 00:49:07 +07:00
|
|
|
if mount | grep "${rootmnt}" | grep -q "(ro,"; then
|
|
|
|
remount="yes"
|
|
|
|
mount -o remount,rw "${rootmnt}"
|
|
|
|
fi
|
2020-03-22 01:14:35 +07:00
|
|
|
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"
|
2020-03-22 00:49:07 +07:00
|
|
|
if [ "${remount}" = "yes" ]; then
|
|
|
|
mount -o remount,ro "${rootmnt}"
|
|
|
|
fi
|
2020-03-22 00:15:25 +07:00
|
|
|
grep -v "unprivileged_userfaultfd" "${rootmnt}/var/log/sysctl-initramfs-error.log"
|
2020-01-16 03:54:06 +07:00
|
|
|
|
|
|
|
true
|