pkg://wmweather_2.4.3-2_powerpc.deb:38218/preinst
info downloads
#!/bin/sh
set -e
[ "$1" = install -o "$1" = upgrade ] || exit 0
[ -e /usr/share/debconf/confmodule -a ! -e /etc/wmweather.conf ] || exit 0
. /usr/share/debconf/confmodule
db_get wmweather/station || exit 0
if [ "$RET" ]; then
station="$RET"
else
station="EDDC"
fi
db_get wmweather/metric || exit 0
if [ "$RET" = false ]; then
metric="#metric"
else
metric="metric"
fi
umask 022
cat > /etc/wmweather.conf.dpkg-new << EOF
# wmweather system-wide configuration
# see also wmweather(1)
# find your station id at http://www.nws.noaa.gov/tg/siteloc.shtml
station = $station
# show metric values, e.g. °C instead of °F, and use Beaufort scale
$metric
beaufort
EOF
mv -fb /etc/wmweather.conf.dpkg-new /etc/wmweather.conf
exit 0