From: Alexander Barton Date: Tue, 26 Dec 2006 14:44:40 +0000 (+0000) Subject: Only "fiddle" with /etc/ngircd in "configure" stage. X-Git-Tag: rel-0-11-0-pre2~75 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=ee568cc4440015b45d7fd12b00974c4d1fba658c Only "fiddle" with /etc/ngircd in "configure" stage. --- diff --git a/contrib/Debian/ngircd.postinst b/contrib/Debian/ngircd.postinst index b2ae4053..55679342 100755 --- a/contrib/Debian/ngircd.postinst +++ b/contrib/Debian/ngircd.postinst @@ -1,13 +1,20 @@ #!/bin/sh # # Debian post-installation script -# $Id: ngircd.postinst,v 1.1 2003/12/31 17:20:11 alex Exp $ +# $Id: ngircd.postinst,v 1.2 2006/12/26 14:44:40 alex Exp $ # -if [ -f /etc/ngircd/ngircd.conf ]; then - # make sure that configuration file is not world readable - chmod o= /etc/ngircd/ngircd.conf -fi +set -e + +case "$1" in + configure) + if [ -f /etc/ngircd/ngircd.conf ]; then + # make sure that the configuration file is not + # world-readable, it contains passwords! + chmod o= /etc/ngircd/ngircd.conf + fi + ;; +esac #DEBHELPER#