<div dir="ltr">We can include default file like /etc/default/sheepdog in rpm package with content:<div><span style="font-family:arial,sans-serif;font-size:13px">SHEEP_OPTS="</span><span style="font-family:arial,sans-serif;font-size:13px">--log std=syslog </span><span style="font-size:13px;font-family:arial,sans-serif">--upgrade --cluster local /var/lib/sheepdog</span><span style="font-size:13px;font-family:arial,sans-serif">"</span></div><div> and use<div>ExecStart=/usr/sbin/sheep --pidfile /var/run/sheep.pid $SHEEP_OPTS<br></div><div>in /usr/lib/systemd/system/sheepdog.service</div><div>User must to edit /etc/default/sheepdog for override sane defaults.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-27 6:17 GMT+10:00 Vasiliy Tolstov <span dir="ltr"><<a href="mailto:v.tolstov@selfip.ru" target="_blank">v.tolstov@selfip.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2014-11-26 18:58 GMT+03:00 Vladislav Gorbunov <<a href="mailto:vadikgo@gmail.com">vadikgo@gmail.com</a>>:<br>
> Didn't work:<br>
> sheepdog.service - Sheepdog QEMU/KVM Block Storage<br>
>    Loaded: loaded (/usr/lib/systemd/system/sheepdog.service; enabled)<br>
>    Active: failed (Result: exit-code) since Чт 2014-11-27 01:57:52 MAGT; 1s<br>
> ago<br>
>   Process: 30115 ExecStart=/usr/sbin/sheep --pidfile /var/run/sheep.pid<br>
> $(echo ${SHEEP_OPTS:-"--cluster local --log dst=syslog - -upgrade<br>
> /var/lib/sheepdog"}) (code=exited, status=1/FAILURE)<br>
>  Main PID: 29990 (code=exited, status=0/SUCCESS)<br>
<br>
<br>
</span>Yes. I think we can use something like:<br>
/usr/sbin/sheep --pidfile /var/run/sheep.pid --log std=syslog<br>
--upgrade --cluster local $SHEEP_OPTS /var/lib/sheepdog<br>
<br>
in this case user have ability to override sane defaults and default<br>
sheepdog path.<br>
<br>
Error that you see because systemd differently understand $VARIABLE<br>
and ${VARIABLE}<br>
(see <a href="http://www.alaux.net/articles/systemd-unit-files-and-environment-variables/" target="_blank">http://www.alaux.net/articles/systemd-unit-files-and-environment-variables/</a>)<br>
<br>
If you know better how to provide working defaults and add ability to<br>
override it, i'm very interesting.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Vasiliy Tolstov,<br>
e-mail: <a href="mailto:v.tolstov@selfip.ru">v.tolstov@selfip.ru</a><br>
jabber: <a href="mailto:vase@selfip.ru">vase@selfip.ru</a><br>
</div></div></blockquote></div><br></div>