[sheepdog] [PATCH] deb: enable dh_systemd and provide a Debian-specific service file.
Liu Yuan
namei.unix at gmail.com
Tue Feb 10 04:57:35 CET 2015
On Mon, Feb 09, 2015 at 02:29:14PM -0800, Alexander Guy wrote:
> The existing Debian sysvinit scripts are using different
> environment variable names for configuration than those
> present in the upstream systemd service file (e.g. DAEMON_ARGS).
> This naming difference breaks sheepdog on Debian installs that
> are using sysvinit and then migrate to systemd.
>
> This patch provides a simple fix for the current issue, until
> the time unification of variable names is desired/worked on.
>
> Signed-off-by: Alexander Guy <alexander at andern.org>
> ---
> debian/control | 1 +
> debian/rules | 2 +-
> debian/sheepdog.service | 17 +++++++++++++++++
> 3 files changed, 19 insertions(+), 1 deletion(-)
> create mode 100644 debian/sheepdog.service
>
> diff --git a/debian/control b/debian/control
> index 97713da..d6e7af8 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -5,6 +5,7 @@ Maintainer: PKG OpenStack <openstack-devel at lists.alioth.debian.org>
> Uploaders: YunQiang Su <wzssyqa at gmail.com>
> Build-Depends: debhelper (>= 9),
> dh-autoreconf,
> + dh-systemd,
> bash-completion,
> pkg-config,
> libcorosync-dev,
> diff --git a/debian/rules b/debian/rules
> index 4a8e925..a917780 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -9,7 +9,7 @@ UPSTREAM_GIT ?= git://github.com/sheepdog/sheepdog.git
> GIT_TAG ?= $(shell echo v'$(VERSION)' | sed -e 's/~/_/')
>
> %:
> - dh $@ --with autoreconf
> + dh $@ --with autoreconf,systemd
>
> override_dh_builddeb:
> dh_builddeb -- -Zxz -z9
> diff --git a/debian/sheepdog.service b/debian/sheepdog.service
> new file mode 100644
> index 0000000..a557a2a
> --- /dev/null
> +++ b/debian/sheepdog.service
> @@ -0,0 +1,17 @@
> +[Unit]
> +Description=Sheepdog QEMU/KVM Block Storage
> +After=network.target
> +Wants=syslog.target
> +
> +[Service]
> +EnvironmentFile=/etc/default/sheepdog
> +ExecStart=/usr/sbin/sheep $DAEMON_ARGS --pidfile /var/run/sheep.pid $SHEEPDOG_PATH
> +PIDFile=/var/run/sheep.pid
> +Type=forking
> +Restart=on-abort
> +StartLimitInterval=10s
> +StartLimitBurst=3
> +LimitNOFILE=32768
> +
> +[Install]
> +WantedBy=multi-user.target
> --
> 2.1.4
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog
Applied, thanks.
Yuan
More information about the sheepdog
mailing list