#!/bin/sh set -e # Replacing a non-conffile config file with a conffile. If the config file # is unmodified, remove it and it will be replaced on unpack. If it's # modified, leave it in place and let the usual conffile handling take # care of it. config_to_conffile() { CONFFILE="$1" old_md5sum="$2" if [ -e "$CONFFILE" ]; then md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" if [ "$md5sum" = "$old_md5sum" ]; then echo "Transitioning $CONFFILE to be a conffile ..." rm -f "$CONFFILE" fi fi } if dpkg --compare-versions "$2" lt 0.6.9; then config_to_conffile /etc/network/if-up.d/upstart \ 4edc4267af9a0bb5aebff50ee4671513 config_to_conffile /etc/init/network-interface.conf \ e1f786e36cfe970812604b86ba03a9f0 fi