File: dnet-common.preinst

package info (click to toggle)
dnprogs 2.65
  • links: PTS
  • area: main
  • in suites: buster
  • size: 3,316 kB
  • ctags: 4,050
  • sloc: ansic: 27,180; cpp: 10,673; makefile: 851; sh: 559; fortran: 76; awk: 13
file content (35 lines) | stat: -rwxr-xr-x 862 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
#

set -e

if [ "$2" != "2.56.1+nmu1" ]
then
  exit 0
fi

. /usr/share/debconf/confmodule

db_get dnet-common/configure-action
configure_action=$RET

# Get the node name and address
db_get dnet-common/nodename
name=$RET
db_get dnet-common/nodeaddr
addr=$RET

db_stop

# Update /etc/decnet.conf
if [ "$configure_action" = 'configure later' -a "$name" = 'linux' -a "$addr" = '1.10' -a -f /etc/decnet.conf ]
then
  echo 'dnet-common: Last version (2.56.1+nmu1) may broke your config files. I try to undo this now.'
  echo 'dnet-common: A backup of your nodedatabase can be found in /etc/decnet.conf.nmubackup'
  echo 'dnet-common: If there is any problem please include /etc/default/decnet in the bug report.'
  mv -v /etc/decnet.conf /etc/decnet.conf.nmubackup
  sed -i 's/^DNET_INTERFACES=""/DNET_INTERFACES="all"/' /etc/default/decnet

fi

#DEBHELPER#