File: config

package info (click to toggle)
nut 0.45.5-rel-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,984 kB
  • ctags: 2,146
  • sloc: ansic: 22,216; sh: 1,138; makefile: 405
file content (37 lines) | stat: -rw-r--r-- 813 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh -e

# source the debconf library
. /usr/share/debconf/confmodule

case "$1" in

  configure)
    # ask this if upgrading to 0.44.0
    if dpkg --compare-versions "$2" lt-nl "0.44.0" ; then
      db_input medium nut/remove_debian_conf || true
      db_go
    fi

    # ask this if upgrading to 0.44.1
    if dpkg --compare-versions "$2" lt-nl "0.44.1" ; then
      # manual modification of /etc/nut/upsmon.conf is required
      db_input critical nut/major_conf_changes || true
      db_go
      db_get nut/major_conf_changes
      if [ "$RET" = "false" ] ; then
        exit 1
      fi
    fi

    # ask this if upgrading to 0.44.1-3
    if dpkg --compare-versions "$2" lt-nl "0.44.1-3" ; then
      db_input medium nut/change_system_user || true
      db_go
    fi
    ;;

  reconfigure)
    ;;

esac