[systemd-devel] problem with service that uses bash loop
lennart at poettering.net
Tue Mar 29 12:07:57 PDT 2011
On Tue, 29.03.11 21:06, Michał Piotrowski (mkkp4x4 at gmail.com) 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 some magical way in which I can make a simple loop in
> >> ExecStop?
> > Hmm, are you suggesting that this works in ExecStart but not in
> > ExecStop? That would be a bug.
> I tried
> ExecStop=-/sbin/modprobe -qabr $BUS_MODULES $HWMON_MODULES
> too and also does not work.
What precisely fails? Is the command line not properly constructed? Do
you have any further hints?
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel