]>
git.proxmox.com Git - pve-cluster.git/blob - debian/pve-cluster.postinst
3 # abort if any command returns an error value
6 # handle problem with ha-manager <= 2.0-3 which cannot handle a pmxcfs
8 # TODO: remove in PVE 6.0
9 ha_version
=$
(dpkg-query
--showformat='${Version}' --show pve-ha-manager
)
10 hacfg_version
=$
(dpkg-query
--showformat='${Config-Version}' --show pve-ha-manager
)
12 function handlehaservice
{
14 # no old version, nothing to do
17 if dpkg
--compare-versions "$ha_version" '<=' '2.0-3' || dpkg
--compare-versions "$hacfg_version" '<=' '2.0-3'; then
18 if systemctl
--quiet "$2" "pve-ha-crm.service"; then
19 systemctl
"$3" "pve-ha-crm.service"
21 if systemctl
--quiet "$2" "pve-ha-lrm.service"; then
22 systemctl
"$3" "pve-ha-lrm.service"
31 handlehaservice
"$2" 'is-active' 'stop'
40 handlehaservice
"$2" 'is-enabled' 'start'