From patchwork Wed Apr 22 15:05:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: packages/micrond: show stdout and stderr in log From: Adrian Schmutzler X-Patchwork-Id: 1360 Message-Id: <20200422150500.4272-1-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Cc: Adrian Schmutzler Date: Wed, 22 Apr 2020 17:05:00 +0200 So far, all output created by scripts run with micrond has been discarded. Since there is no reason for that and it also does not match the expected behavior, this enables both stdout and stderr output for the service. If not desired, a user can still use >/dev/null or similar in his/her micrond jobs to disable output easily and similar to what it would be on other systems. For our firmware, this will mean that all micrond script will now start to spam logread. Signed-off-by: Adrian Schmutzler Reviewed-by: Fabian Bläse --- ...icrond-show-stdout-and-stderr-in-log.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 feed_patches/openwrt/0030-micrond-show-stdout-and-stderr-in-log.patch diff --git a/feed_patches/openwrt/0030-micrond-show-stdout-and-stderr-in-log.patch b/feed_patches/openwrt/0030-micrond-show-stdout-and-stderr-in-log.patch new file mode 100644 index 00000000..3d7afe7e --- /dev/null +++ b/feed_patches/openwrt/0030-micrond-show-stdout-and-stderr-in-log.patch @@ -0,0 +1,44 @@ +From: Adrian Schmutzler +Date: Wed, 22 Apr 2020 16:57:34 +0200 +Subject: micrond: show stdout and stderr in log + +So far, all output created by scripts run with micrond has been +discarded. Since there is no reason for that and it also does not +match the expected behavior, this enables both stdout and stderr +output for the service. + +If not desired, a user can still use >/dev/null or similar in his/her +micrond jobs to disable output easily and similar to what it would be +on other systems. + +Signed-off-by: Adrian Schmutzler +--- + utils/micrond/Makefile | 2 +- + utils/micrond/files/etc/init.d/micrond | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/utils/micrond/Makefile b/utils/micrond/Makefile +index ba063b674..c979025bb 100644 +--- a/utils/micrond/Makefile ++++ b/utils/micrond/Makefile +@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk + + PKG_NAME:=micrond + PKG_VERSION:=1 +-PKG_RELEASE:=1 ++PKG_RELEASE:=2 + PKG_LICENSE:=BSD-2-clause + + include $(INCLUDE_DIR)/package.mk +diff --git a/utils/micrond/files/etc/init.d/micrond b/utils/micrond/files/etc/init.d/micrond +index 1eef2ef52..35a3b9e70 100755 +--- a/utils/micrond/files/etc/init.d/micrond ++++ b/utils/micrond/files/etc/init.d/micrond +@@ -9,5 +9,7 @@ start_service() { + procd_open_instance + procd_set_param command /usr/sbin/micrond "$CRONDIR" + procd_set_param respawn ++ procd_set_param stdout 1 ++ procd_set_param stderr 1 + procd_close_instance + }