2015-05-27 15:00:49 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# summary of how this script can be called:
|
|
|
|
# * <new-preinst> `install'
|
|
|
|
# * <new-preinst> `install' <old-version>
|
|
|
|
# * <new-preinst> `upgrade' <old-version>
|
|
|
|
# * <old-preinst> `abort-upgrade' <new-version>
|
|
|
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
|
|
# the debian-policy package
|
|
|
|
|
2015-05-27 17:14:50 +02:00
|
|
|
#DEBHELPER#
|
|
|
|
|
2015-05-27 15:00:49 +02:00
|
|
|
case "$1" in
|
|
|
|
upgrade)
|
|
|
|
# save old configuration
|
|
|
|
test -d /etc/shellinabox/options-enabled || exit 0
|
2015-05-27 17:14:50 +02:00
|
|
|
ls /etc/shellinabox/options-enabled/*.css > /dev/null 2>&1 || exit 0
|
2015-05-27 15:00:49 +02:00
|
|
|
if dpkg --compare-versions "$2" le "2.14-1"; then
|
|
|
|
mkdir -p /etc/shellinabox/options-enabled-save
|
|
|
|
cp -a /etc/shellinabox/options-enabled/*.css /etc/shellinabox/options-enabled-save
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
install|abort-upgrade)
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "preinst called with unknown argument \`$1'" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|