X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=squirrelmail-change-pass-cn.git;a=blobdiff_plain;f=debian%2Fprerm;fp=debian%2Fprerm;h=9827786574bd5adb8d983fdf0561ca82d08b155b;hp=11b8ed817ec16e36f7aecd771c6e9793671122cb;hb=83f37b8fd3d56064545b37748c3c511545eb9000;hpb=63141890938d804f336b8dbdba327f6c5c686738 diff --git a/debian/prerm b/debian/prerm index 11b8ed8..9827786 100644 --- a/debian/prerm +++ b/debian/prerm @@ -14,10 +14,10 @@ case "$1" in # Remove CARNet configuration from /etc/hosts.allow and # /etc/hosts.deny. # - if [ -f "/etc/hosts.allow" ]; then + if [ -f /etc/hosts.allow ]; then cp-update -r "$PKG" /etc/hosts.allow fi - if [ -f "/etc/hosts.deny" ]; then + if [ -f /etc/hosts.deny ]; then cp-update -r "$PKG" /etc/hosts.deny fi @@ -25,19 +25,19 @@ case "$1" in # configuration. # SQCONF=/etc/squirrelmail/config.php - - cp_echo "CN: Disabling SquirrelMail change_pass plugin in $SQCONF" - cp_check_and_sed '^\$plugins.*change_pass' \ - '/^\$plugins.*change_pass/d' \ - "$SQCONF" || true + + if egrep -q '^\$plugins\[[0-9]+\][\ ]*=[\ ]*'\''change_pass'\' "$SQCONF"; then + cp_echo "CN: Disabling SquirrelMail change_pass plugin in $SQCONF" + /usr/sbin/squirrelmail-configure --remove-plugin change_pass + fi # Remove poppassd service from xinetd. # - if [ -f "/etc/xinetd.d/poppassd" ]; then + if [ -f /etc/xinetd.d/poppassd ]; then if egrep -q "^# Begin update by CARNet package " /etc/xinetd.d/poppassd; then - cp_echo "CN: Removing poppassd service from xinetd configuration." + cp_echo "CN: Removing poppassd service from xinetd configuration" rm -f /etc/xinetd.d/poppassd need_restart=1 fi