File: lvm2.preinst

package info (click to toggle)
lvm2 2.02.168-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,500 kB
  • ctags: 15,264
  • sloc: ansic: 142,688; sh: 22,776; python: 6,500; makefile: 2,288; ruby: 332; awk: 20; cpp: 10
file content (23 lines) | stat: -rw-r--r-- 601 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -e

case "$1" in
    upgrade)
        if dpkg --compare-versions "$2" lt 2.02.88-1; then
            if [ -d /etc/lvm/cache ]; then
                rm -rf /etc/lvm/cache
            fi
        fi
        if dpkg --compare-versions "$2" lt 2.02.122-2; then
            if [ -x "/usr/bin/deb-systemd-helper" ]; then
                deb-systemd-helper purge lvm2-activation.service lvm2-activation-early.service >/dev/null
                deb-systemd-helper unmask lvm2-activation.service lvm2-activation-early.service >/dev/null
            fi
        fi
    ;;
esac

#DEBHELPER#

exit 0