From cb865009682706f588c6993dee784433593ab6db Mon Sep 17 00:00:00 2001 From: Grzegorz Kowalski Date: Tue, 12 Mar 2024 19:06:05 +0100 Subject: [PATCH] fix hidepid --- recipes-hardening/hidepid/hidepid/hidepid.sh | 6 ++---- recipes-hardening/hidepid/hidepid_1.0.bb | 8 +++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes-hardening/hidepid/hidepid/hidepid.sh b/recipes-hardening/hidepid/hidepid/hidepid.sh index ad89fca..0dada2b 100644 --- a/recipes-hardening/hidepid/hidepid/hidepid.sh +++ b/recipes-hardening/hidepid/hidepid/hidepid.sh @@ -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 diff --git a/recipes-hardening/hidepid/hidepid_1.0.bb b/recipes-hardening/hidepid/hidepid_1.0.bb index f78eb9f..e6e532b 100644 --- a/recipes-hardening/hidepid/hidepid_1.0.bb +++ b/recipes-hardening/hidepid/hidepid_1.0.bb @@ -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 }