2015-03-09 10:47:19 +01:00
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
2021-05-12 20:54:22 +02:00
dh $@
2015-03-09 12:11:46 +01:00
2018-10-10 13:55:05 +02:00
override_dh_install:
# embed copies of libpve-common-perl files needed by simulator
install -d -m 0755 debian/tmp/usr/share/pve-ha-simulator/PVE
install -m 0644 \
/usr/share/perl5/PVE/Exception.pm \
/usr/share/perl5/PVE/JSONSchema.pm \
/usr/share/perl5/PVE/ProcFSTools.pm \
/usr/share/perl5/PVE/SafeSyslog.pm \
/usr/share/perl5/PVE/SectionConfig.pm \
/usr/share/perl5/PVE/Syscall.pm \
/usr/share/perl5/PVE/Tools.pm \
debian/tmp/usr/share/pve-ha-simulator/PVE/
2021-05-12 20:54:22 +02:00
dh_install
override_dh_missing:
dh_missing --fail-missing
2018-10-10 13:55:05 +02:00
2017-12-20 11:34:03 +01:00
# dh_systemd_enable watchdog-mux despite it being static to get it installed in
# the correct location/package without manual intervention
2015-03-09 12:11:46 +01:00
override_dh_systemd_enable:
2017-12-20 11:34:01 +01:00
dh_systemd_enable -ppve-ha-manager --name watchdog-mux watchdog-mux.service
dh_systemd_enable -ppve-ha-manager --name pve-ha-crm pve-ha-crm.service
dh_systemd_enable -ppve-ha-manager --name pve-ha-lrm pve-ha-lrm.service
2015-03-12 08:45:19 +01:00
2017-12-20 11:34:03 +01:00
# restart LRM first, else single-node clusters with configured HA will deadlock
2015-03-12 08:45:19 +01:00
override_dh_systemd_start:
2015-03-27 08:51:41 +01:00
dh_systemd_start -ppve-ha-manager --name pve-ha-lrm --restart-after-upgrade pve-ha-lrm.service
2015-03-26 10:21:02 +01:00
dh_systemd_start -ppve-ha-manager --name pve-ha-crm --restart-after-upgrade pve-ha-crm.service