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 <[email protected]>: > 2014-11-26 18:58 GMT+03:00 Vladislav Gorbunov <[email protected]>: > > 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: [email protected] > jabber: [email protected] >
-- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
