summarylogtreecommitdiffstats
path: root/poldi.install
blob: 262ad7c1bb792e399ae2fbb6162119c6d99b68b6 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
## arg 1:  the new package version
pre_install() {
  # do nothing here
  /bin/true
}

infodir=/usr/share/info


## arg 1:  the new package version
post_install() {
  for file in ${filelist[@]}; do
    install-info $infodir/$file $infodir/dir 2> /dev/null
  done

  echo "Poldi is now installed."
  echo
  echo "Since this is the first time you've installed poldi, the template configuration files have been placed in /etc/poldi. Take a look and edit them to your needs."
  echo "The original templates will remain in /usr/share/doc/poldi/example_etc/poldi."

  mkdir -p /etc/poldi
  cp -fR /usr/share/doc/poldi/example_etc/poldi/* /etc/poldi/

  echo
  echo "Future upgrades to this package will NOT overwrite your configuration files in /etc/poldi, since this might seriously break things. The latest version of the template configuration files can always be found in /usr/share/doc/poldi/example_etc/poldi."
}

## arg 1:  the new package version
## arg 2:  the old package version
pre_upgrade() {
  # do nothing here
  /bin/true
}

## arg 1:  the new package version
## arg 2:  the old package version
post_upgrade() {
  for file in ${filelist[@]}; do
    install-info $infodir/$file $infodir/dir 2> /dev/null
  done

  echo "Poldi has now been upgraded."
  echo
  echo "Warning: Upgrades to this package will not replace any configuration files in /etc/poldi, in order to prevent serious logging in problems."
  echo "The updated sample configuration files are now in /usr/share/doc/poldi/example_etc/poldi. Take a look and update your own files in /etc/poldi if necessary."
}

## arg 1:  the old package version
pre_remove() {
  for file in ${filelist[@]}; do
    install-info --delete $infodir/$file $infodir/dir 2> /dev/null
  done
}

## arg 1:  the old package version
post_remove() {
  # do nothing here
  /bin/true
}

# vim:set ts=2 sw=2 et: