fix hidepid

This commit is contained in:
Grzegorz Kowalski 2024-03-12 19:06:05 +01:00
parent 0e8678e51b
commit cb86500968
2 changed files with 7 additions and 7 deletions

View File

@ -5,9 +5,7 @@
# additionaly harden /proc a little bit more
PROCOPTS="rw,nosuid,nodev,noexec,relatime,hidepid=2"
if mount -o remount,$PROCOPTS /proc; then
success()
echo " /proc remouted with $PROCOPTS"
success; echo " /proc remouted with $PROCOPTS"
else
failure()
echo "/proc not remounted, hidepid not enabled"
failure; echo " /proc not remounted, hidepid not enabled"
fi

View File

@ -5,9 +5,11 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ad
SRC_URI = "file://hidepid.sh"
inherit allarch
DEPENDS = "update-rc.d-native"
INITSCRIPT_NAME = "hidepid"
INITSCRIPT_PARAMS = "start 10 S ."
inherit update-rc.d
do_install() {
install -D -m 0755 ${WORKDIR}/hidepid.sh ${D}${sysconfdir}/init.d/hidepid.sh
update-rc.d -r ${D} hidepid.sh start 10 S .
install -D -m 0755 ${WORKDIR}/hidepid.sh ${D}${sysconfdir}/init.d/hidepid
}