File: cloud-init.preinst

package info (click to toggle)
cloud-init 20.2-2~deb10u2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,276 kB
  • sloc: python: 69,663; sh: 3,915; makefile: 105; xml: 21
file content (20 lines) | stat: -rw-r--r-- 571 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# vi: ts=4 expandtab

cleanup_lp1552999() {
    local oldver="$1" last_bad_ver="0.7.7~bzr1178"
    dpkg --compare-versions "$oldver" le "$last_bad_ver" || return 0
    local hdir="/var/lib/systemd/deb-systemd-helper-enabled"
    hdir="$hdir/multi-user.target.wants" 
    local edir="/etc/systemd/system/multi-user.target.wants"
    rm -f "$hdir/cloud-config.service" "$hdir/cloud-final.service" \
        "$hdir/cloud-init-local.service" "$hdir/cloud-init.service"
}


if [ "$1" = "upgrade" ]; then
   oldver="$2"
   cleanup_lp1552999 "$oldver"
fi

#DEBHELPER#