1234567891011121314151617181920212223242526272829303132333435 |
- #!/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" ]
- 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
|