File: preinst

package info (click to toggle)
chrony 1.21z-5
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 2,080 kB
  • ctags: 2,375
  • sloc: ansic: 14,831; yacc: 858; sh: 588; perl: 426; makefile: 148
file content (23 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (6)
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
# preinst for Chrony  John G. Hasler jhasler@debian.org 2006
# Any possessor of a copy of this program may treat it as if it
# were in the public domain.  I waive all rights.

case "$1" in
    install|upgrade)

# If we are upgrading from an old version protect the keys and
# conf files from dpkg.

        if dpkg --compare-versions "$2" lt-nl 1.21-3 ; then
            mv /etc/chrony/chrony.keys /etc/chrony/chrony.keys."$2"
	    mv /etc/chrony/chrony.conf /etc/chrony/chrony.conf."$2"
        fi
    ;;

    *)
        exit 0
    ;;
esac
exit 0