File: sysstat.config

package info (click to toggle)
sysstat 12.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,092 kB
  • sloc: ansic: 47,023; sh: 1,314; xml: 1,287; makefile: 766; tcl: 756; python: 277; perl: 257
file content (39 lines) | stat: -rw-r--r-- 785 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# vim:ts=4:et

set -e

S_UPSTR_VERSION="10.3.1"
S_VERSION="${S_UPSTR_VERSION}-1~"
DEFAULT=/etc/default/sysstat
    
. /usr/share/debconf/confmodule

db_version 2.0 || true

if [ "$1" = "configure" ] ; then
    if dpkg --compare-versions "$2" lt-nl "$S_VERSION"; then

        db_beginblock || true
        db_subst sysstat/remove_files s_version "$S_UPSTR_VERSION"  || true
        db_input high sysstat/remove_files || true
        db_endblock || true
    
        db_go || true
    fi
fi


# read our default file
if [ -r "$DEFAULT" ] ; then 
    ENABLED=false
    . "$DEFAULT"
    [ "$ENABLED" = "true" ] || [ "$ENABLED" = "false" ] || ENABLED=false

    db_set sysstat/enable "$ENABLED" || true
fi    

db_input low sysstat/enable  || true
db_go || true

db_stop || true