Re: [systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Michał Piotrowski
W dniu 29 marca 2011 21:52 użytkownik Lennart Poettering napisał: > On Tue, 29.03.11 21:46, Michał Piotrowski ([email protected]) wrote: > >> > Ah of course! Otherwise the modprobe is executed right when the last >> > process you ran before exited... >> >> I do not understand why this is so. >> >>

Re: [systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Lennart Poettering
On Tue, 29.03.11 21:46, Michał Piotrowski ([email protected]) wrote: > > Ah of course! Otherwise the modprobe is executed right when the last > > process you ran before exited... > > I do not understand why this is so. > > example I > Type=oneshot > ExecStart=A > ExecStart=B > ExecStop=C > > ex

Re: [systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Michał Piotrowski
W dniu 29 marca 2011 21:30 użytkownik Lennart Poettering napisał: > On Tue, 29.03.11 21:27, Michał Piotrowski ([email protected]) wrote: > >> >> I added >> RemainAfterExit=yes >> and now service behaves as expected. > > Ah of course! Otherwise the modprobe is executed right when the last > process

Re: [systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Lennart Poettering
On Tue, 29.03.11 21:27, Michał Piotrowski ([email protected]) wrote: > > I added > RemainAfterExit=yes > and now service behaves as expected. Ah of course! Otherwise the modprobe is executed right when the last process you ran before exited... Lennart -- Lennart Poettering - Red Hat, Inc. ___

Re: [systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Michał Piotrowski
W dniu 29 marca 2011 21:15 użytkownik Michał Piotrowski napisał: > W dniu 29 marca 2011 21:07 użytkownik Lennart Poettering > napisał: >> On Tue, 29.03.11 21:06, Michał Piotrowski ([email protected]) wrote: >> >>> >> [Install] >>> >> WantedBy=multi-user.target >>> >> >>> >> It works well until I

Re: [systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Michał Piotrowski
W dniu 29 marca 2011 21:07 użytkownik Lennart Poettering napisał: > On Tue, 29.03.11 21:06, Michał Piotrowski ([email protected]) wrote: > >> >> [Install] >> >> WantedBy=multi-user.target >> >> >> >> It works well until I add >> >> ExecStop=/bin/bash -c "for module in $HWMON_MODULES $BUS_MODULES;

Re: [systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Lennart Poettering
On Tue, 29.03.11 21:06, Michał Piotrowski ([email protected]) wrote: > >> [Install] > >> WantedBy=multi-user.target > >> > >> It works well until I add > >> ExecStop=/bin/bash -c "for module in $HWMON_MODULES $BUS_MODULES; do > >> /sbin/modprobe -r $module >/dev/null 2>&1; done" > >> > >> Is there

Re: [systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Michał Piotrowski
W dniu 29 marca 2011 20:48 użytkownik Lennart Poettering napisał: > On Tue, 29.03.11 20:30, Michał Piotrowski ([email protected]) wrote: > >> Hi, >> >> I've got a service >> >> [Unit] >> Description=lm_sensors for monitoring motherboard sensor values >> After=syslog.target >> >> [Service] >> Envir

Re: [systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Lennart Poettering
On Tue, 29.03.11 20:30, Michał Piotrowski ([email protected]) wrote: > Hi, > > I've got a service > > [Unit] > Description=lm_sensors for monitoring motherboard sensor values > After=syslog.target > > [Service] > EnvironmentFile=/etc/sysconfig/lm_sensors > Type=oneshot > ExecStart=/bin/bash -c

[systemd-devel] problem with service that uses bash loop

2011-03-29 Thread Michał Piotrowski
Hi, I've got a service [Unit] Description=lm_sensors for monitoring motherboard sensor values After=syslog.target [Service] EnvironmentFile=/etc/sysconfig/lm_sensors Type=oneshot ExecStart=/bin/bash -c "for module in $BUS_MODULES $HWMON_MODULES; do /sbin/modprobe $module >/dev/null 2>&1; done" E