#!/bin/sh -e

PKG=`basename $0 | sed -e 's/\.[^.]*$//'`
CFG=/etc/${PKG}.conf

. /usr/share/debconf/confmodule

# mount point for cdrom
db_get ${PKG}/cdmount

if [ -e ${CFG} ] ; then
    mv $CFG ${CFG}~
    sed "s?^\([^#^ ][^#^ ]*\)?$RET?" ${CFG}~ > ${CFG}
    rm  ${CFG}~
else
    echo "# Configuration for ${PKG}" > ${CFG}
    echo "# Set the mount point for the photo CD here in a single line." >> ${CFG}
    echo "$RET" >> ${CFG}
fi

#DEBHELPER#
