emptty: handle legacy init a litte better
PATCH 1/2 emptty: handle legacy init a litte better
From: Randolph Sapp <[email protected]>
I've found some odd behavior with this application when it comes to daemonization and working with legacy init systems. Some of this was related to sequencing regarding this script and the depedent seat script, other parts are just related to this application. This fixes up most of that behavior until it can be addressed upstream.
Signed-off-by Randolph Sapp <[email protected]>
--- .../recipes-graphics/emptty/emptty/init | 23 +++++++++++++++---- .../recipes-graphics/emptty/emptty_0.13.0.bb | 7 +++--- 2 files changed, 22 insertions(+), 8 deletions(-)
meta-arago-distro/recipes-graphics/emptty/emptty/init +19 -4
@@ -1,4 +1,13 @@ #!/bin/sh +# +### BEGIN INIT INFO +# Provides: emptty +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 5 +# Default-Stop: 0 1 2 3 6 +# X-Interactive: true +### END INIT INFO PIDFILE=/var/run/emptty.pid
@@ -8,16 +17,22 @@ PIDFILE=/var/run/emptty.pid case "$1" in start) echo "Starting display manager: emptty" - start-stop-daemon -S -p $PIDFILE -x /usr/bin/emptty + start-stop-daemon -b -S -p $PIDFILE -x /usr/bin/emptty -- -d ;; stop) echo "Stopping display manager: emptty" - start-stop-daemon -S -p $PIDFILE -x /usr/bin/emptty + start-stop-daemon -K -p $PIDFILE -x /usr/bin/emptty ;; restart) - start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/bin/emptty + start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/bin/emptty -- -d sleep 2 - start-stop-daemon -S -p $PIDFILE -x /usr/bin/emptty + start-stop-daemon -b -S -p $PIDFILE -x /usr/bin/emptty + ;; + reload|force-reload) + start-stop-daemon -K -p $PIDFILE -s 1 -x /usr/bin/emptty + ;; + status) + status /usr/bin/emptty ;; *) echo "usage: $0 { start | stop | restart }"
meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb +3 -4
@@ -9,6 +9,7 @@ SRC_URI = "\ git://${GO_IMPORT}.git;protocol=https;branch=master \ git://${GO_IMPORT_pam}.git;protocol=https;branch=master;name=pam;destsuffix=${S}/src/${GO_IMPORT_pam} \ file://pamconf \ + file://init \ " SRCREV = "4046552b6f5cc1cf76ce8bf333e04e16c59febca" SRCREV_pam = "50ded1b0e7864b9bf75005eb945a8ec826bcf69d"
@@ -29,7 +30,7 @@ GOBUILDFLAGS:append = " -tags=${GO_TAGS}" export GO111MODULE="off" -inherit go systemd +inherit go update-rc.d systemd DEPENDS:append = " gzip"
@@ -72,7 +73,5 @@ RDEPENDS:${PN}:append = " virtual-emptty-conf pam-plugin-succeed-if" SYSTEMD_SERVICE:${PN} = "emptty.service" INITSCRIPT_NAME = "emptty" -INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." +INITSCRIPT_PARAMS = "start 10 5 2 . stop 20 0 1 6 ." INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}" - -inherit update-rc.d systemd
Signature · 1 line
2.48.1
PATCH 2/2 emptty: address feedback around append usage
From: Randolph Sapp <[email protected]>
Shy away from using append when not strictly necessary. Move the pam specific runtime dependency under the relevant PACKAGECONFIG.
Signed-off-by Randolph Sapp <[email protected]>
--- .../recipes-graphics/emptty/emptty_0.13.0.bb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb +10 -8
@@ -16,23 +16,25 @@ SRCREV_pam = "50ded1b0e7864b9bf75005eb945a8ec826bcf69d" SRCREV_FORMAT .= "_pam" -PACKAGES:append = " ${PN}-conf" +PACKAGES += "${PN}-conf" PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam x11', d)}" -PACKAGECONFIG[pam] = ",,libpam" +PACKAGECONFIG[pam] = ",,libpam,pam-plugin-succeed-if" PACKAGECONFIG[x11] = ",,virtual/libx11" +DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'libxcrypt', d)}" + GO_TAGS = "" GO_TAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pam', '', ',nopam', d)}" GO_TAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', ',noxlib', d)}" -GOBUILDFLAGS:append = " -tags=${GO_TAGS}" +GOBUILDFLAGS += "-tags=${GO_TAGS}" export GO111MODULE="off" inherit go update-rc.d systemd -DEPENDS:append = " gzip" +DEPENDS += "gzip-native" do_install () { # general collateral
@@ -64,11 +66,11 @@ FILES:${PN} = "\ ${sysconfdir}/pam.d/emptty \ " -FILES:${PN}-conf:append = " ${sysconfdir}/emptty/conf" -CONFFILES:${PN}-conf:append = " ${sysconfdir}/emptty/conf" -RPROVIDES:${PN}-conf:append = " virtual-emptty-conf" +FILES:${PN}-conf += "${sysconfdir}/emptty/conf" +CONFFILES:${PN}-conf += "${sysconfdir}/emptty/conf" +RPROVIDES:${PN}-conf += "virtual-emptty-conf" -RDEPENDS:${PN}:append = " virtual-emptty-conf pam-plugin-succeed-if" +RDEPENDS:${PN} += "virtual-emptty-conf" SYSTEMD_SERVICE:${PN} = "emptty.service"
Signature · 1 line
2.48.1