123456789101112131415161718192021222324252627282930313233343536 |
- #!/bin/sh
- set -e
- DEFAULT_CONF='/etc/softflowd/default.conf'
- LEGACY_CONF='/etc/default/softflowd'
- case "$1" in
- install)
- ;;
- upgrade)
- if \
- dpkg --compare-versions "$2" lt 0.9.9-4~ &&
- [ -f "$LEGACY_CONF" ] &&
- [ ! -f "$DEFAULT_CONF" ] &&
- [ $(md5sum "$LEGACY_CONF" | awk '{print $1}') != '617dbe97c274b4491b22b85b28f3ccf0' ]
- then
- # create /etc/softflowd/default.conf from /etc/default/softflowd
- # lower-case key names
- mkdir -p "$(dirname "$DEFAULT_CONF")"
- sed -e '
- s/^INTERFACE=/interface=/ ;
- s/^OPTIONS=/options=/ ;
- ' <"$LEGACY_CONF" >"$DEFAULT_CONF"
- fi
- ;;
- abort-upgrade)
- ;;
- *)
- echo "preinst called with unknown argument '$1'"
- exit 1
- ;;
- esac
- #DEBHELPER#
- exit 0
|