]> git.proxmox.com Git - pve-cluster.git/blame - debian/pve-cluster.preinst
pmxcfs: only exit parent when successfully started
[pve-cluster.git] / debian / pve-cluster.preinst
CommitLineData
8639f6be
FG
1#!/bin/bash
2
11d30909 3# abort if any command returns an error value
8639f6be
FG
4set -e
5
6# handle incorrectly installed sysctl.d snippet (pve-cluster 5.0-16 and -17)
7# TODO: remove in PVE 6.0
8function sysctlcleanup {
9 if test -z "$1"; then
10 # no old version, nothing to do
11 true
12 else
13 if dpkg --compare-versions "$1" '<=' '5.0-17'; then
14 # remove directory if it exists
15 # otherwise we can't install our actual pve.conf file
16 if test -d '/etc/sysctl.d/pve.conf'; then
17 rm -rf '/etc/sysctl.d/pve.conf'
18 fi
19 fi
20 fi
21}
22
23case "$1" in
24 upgrade)
25 sysctlcleanup "$2"
26 ;;
27
28 install)
29 sysctlcleanup "$2"
30 ;;
31
32esac
33
34#DEBHELPER#