From ec0ae32da4c9028f188bdf78d3c919e24910a448 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski <jo...@x-tnd.be> Date: Thu, 9 Feb 2017 17:47:26 +0100 Subject: Another try for Environment
--- fusioninventory-agent.service | 3 --- fusioninventory-agent.service.conf | 9 +++++++++ fusioninventory-agent.spec | 9 ++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 fusioninventory-agent.service.conf diff --git a/fusioninventory-agent.service b/fusioninventory-agent.service index 9116f01..2e220d4 100644 --- a/fusioninventory-agent.service +++ b/fusioninventory-agent.service @@ -14,9 +14,6 @@ Description=FusionInventory agent After=syslog.target network.target [Service] -EnvironmentFile=-/etc/sysconfig/fusioninventory-agent -Environment="OPTIONS=--debug" -Environment="PATH=/sbin:/bin:/usr/sbin:/usr/bin" ExecStart=/usr/bin/fusioninventory-agent --daemon --no-fork $OPTIONS [Install] diff --git a/fusioninventory-agent.service.conf b/fusioninventory-agent.service.conf new file mode 100644 index 0000000..77ee066 --- /dev/null +++ b/fusioninventory-agent.service.conf @@ -0,0 +1,9 @@ +# Extra configuration file for fusioninventory-agent unit +[Service] +#Deprecated: will be removed in a future version +EnvironmentFile=-/etc/sysconfig/fusioninventory-agent +#New way to declare values +#Commented right now, because it will be overriden from EnvironmentFile +#Will be enabled in a future version +#Environment="OPTIONS=--debug" +#Environment="PATH=/sbin:/bin:/usr/sbin:/usr/bin" diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 8b3846a..fee1a00 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -17,6 +17,7 @@ Source1: %{name}.cron #https://github.com/fusioninventory/fusioninventory-agent/pull/227 #kept local to avoid upstream BC breaks Source10: %{name}.service +Source11: %{name}.service.conf #Apply https://github.com/fusioninventory/fusioninventory-agent/commit/25404f038f99bd091e0fb2368879e848500f5082 Patch0: %{name}-useless-module-cleaning @@ -64,7 +65,6 @@ You can add additional packages for optional tasks: * fusioninventory-agent-task-wakeonlan not included due to a licensing issue for perl-Net-Write -Edit the /etc/sysconfig/%{name} file for service configuration. %package -n perl-FusionInventory-Agent Summary: Libraries for Fusioninventory agent @@ -232,7 +232,8 @@ mkdir -p %{buildroot}%{_localstatedir}/{log,lib}/%{name} install -m 644 -D logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -m 644 -D %{name}.conf %{buildroot}%{_sysconfdir}/sysconfig/%{name} install -m 755 -Dp %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.hourly/%{name} -install -m 644 -D contrib/unix/%{name}.service %{buildroot}%{_unitdir}/%{name}.service +install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service +install -m 644 -D %{SOURCE11} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/%{name}.conf # Yum plugin installation @@ -261,6 +262,8 @@ install -m 644 -D contrib/yum-plugin/%{name}.conf %{buildroot}%{_sysconfdir}/yum %config(noreplace) %{_sysconfdir}/fusioninventory/agent.cfg %{_sysconfdir}/cron.hourly/%{name} %{_unitdir}/%{name}.service +%dir %{_sysconfdir}/systemd/system/%{name}.service.d +%{_sysconfdir}/systemd/system/%{name}.service.d/%{name}.conf %{_bindir}/fusioninventory-agent %{_bindir}/fusioninventory-injector %{_mandir}/man1/fusioninventory-agent* @@ -320,7 +323,7 @@ install -m 644 -D contrib/yum-plugin/%{name}.conf %{buildroot}%{_sysconfdir}/yum %changelog -* Fri Feb 09 2017 Johan Cwiklinski <jcwiklinski AT teclib DOT com> - 2.3.18-3 +* Thu Feb 09 2017 Johan Cwiklinski <jcwiklinski AT teclib DOT com> - 2.3.18-3 - Change systemd unit to not use fork mode - Re-add options in sysconfig file to get cron mode running -- cgit v1.1 https://src.fedoraproject.org/cgit/fusioninventory-agent.git/commit/?h=master&id=ec0ae32da4c9028f188bdf78d3c919e24910a448 _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org