[sheepdog] [PATCH] fix systemd support on CentOS/RHEL 7
Vladislav Gorbunov
vadikgo at gmail.com
Thu Nov 27 00:44:28 CET 2014
We can include default file like /etc/default/sheepdog in rpm package with
content:
SHEEP_OPTS="--log std=syslog --upgrade --cluster local /var/lib/sheepdog"
and use
ExecStart=/usr/sbin/sheep --pidfile /var/run/sheep.pid $SHEEP_OPTS
in /usr/lib/systemd/system/sheepdog.service
User must to edit /etc/default/sheepdog for override sane defaults.
2014-11-27 6:17 GMT+10:00 Vasiliy Tolstov <v.tolstov at selfip.ru>:
> 2014-11-26 18:58 GMT+03:00 Vladislav Gorbunov <vadikgo at gmail.com>:
> > Didn't work:
> > sheepdog.service - Sheepdog QEMU/KVM Block Storage
> > Loaded: loaded (/usr/lib/systemd/system/sheepdog.service; enabled)
> > Active: failed (Result: exit-code) since Чт 2014-11-27 01:57:52 MAGT;
> 1s
> > ago
> > Process: 30115 ExecStart=/usr/sbin/sheep --pidfile /var/run/sheep.pid
> > $(echo ${SHEEP_OPTS:-"--cluster local --log dst=syslog - -upgrade
> > /var/lib/sheepdog"}) (code=exited, status=1/FAILURE)
> > Main PID: 29990 (code=exited, status=0/SUCCESS)
>
>
> Yes. I think we can use something like:
> /usr/sbin/sheep --pidfile /var/run/sheep.pid --log std=syslog
> --upgrade --cluster local $SHEEP_OPTS /var/lib/sheepdog
>
> in this case user have ability to override sane defaults and default
> sheepdog path.
>
> Error that you see because systemd differently understand $VARIABLE
> and ${VARIABLE}
> (see
> http://www.alaux.net/articles/systemd-unit-files-and-environment-variables/
> )
>
> If you know better how to provide working defaults and add ability to
> override it, i'm very interesting.
>
> --
> Vasiliy Tolstov,
> e-mail: v.tolstov at selfip.ru
> jabber: vase at selfip.ru
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20141127/1a5c8be2/attachment-0004.html>
More information about the sheepdog
mailing list