From a436ad602835dddaa297a7040abbd8f24a879af5 Mon Sep 17 00:00:00 2001 From: Dennis Jusufovic Date: Thu, 8 Feb 2024 10:01:29 +0100 Subject: [PATCH] iiod: Add default env var to service file Systemd now gives a warning when IIOD_EXTRA_OPTS is unset. This change sets it to an empty string by default while still allowing it be overridden by /etc/default/iiod. Fixes #1142. Signed-off-by: Dennis Jusufovic --- iiod/init/iiod.service.cmakein | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iiod/init/iiod.service.cmakein b/iiod/init/iiod.service.cmakein index 0f762474c..f7c310b5e 100644 --- a/iiod/init/iiod.service.cmakein +++ b/iiod/init/iiod.service.cmakein @@ -2,7 +2,7 @@ # # iiod - Systemd init script # -# Copyright (C) 2016-2021 Analog Devices Inc. +# Copyright (C) 2016-2024 Analog Devices Inc. [Unit] Description=IIO Daemon @@ -11,6 +11,7 @@ After=network.target systemd-udev-settle.service ConditionPathExists=/sys/bus/iio [Service] +Environment=$IIOD_EXTRA_OPTS='' EnvironmentFile=-/etc/default/iiod ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/iiod $IIOD_EXTRA_OPTS KillMode=process