From: Russ Allbery Date: Sun, 17 May 2020 06:29:09 +0000 (-0700) Subject: Update coding style of maintainer scripts X-Git-Tag: archive/debian/3.2-1~2 X-Git-Url: https://git.eyrie.org/?a=commitdiff_plain;h=2c44a48bddbbea020140e6037a4d0eb550a03284;p=kerberos%2Fkrb5-strength.git Update coding style of maintainer scripts --- diff --git a/debian/postinst b/debian/postinst index 1f23e24..4b72a60 100755 --- a/debian/postinst +++ b/debian/postinst @@ -3,14 +3,14 @@ set -e # Add a user to own the password history database. -if ! getent passwd _history >/dev/null ; then +if ! getent passwd _history >/dev/null; then echo 'Adding system user for password history' 1>&2 adduser --disabled-login --quiet --system --no-create-home \ --home /var/lib/heimdal-history --force-badname --group _history fi # Create the directory for the history database, owned by the history user. -if [ ! -d /var/lib/heimdal-history ] ; then +if [ ! -d /var/lib/heimdal-history ]; then mkdir /var/lib/heimdal-history chown _history:_history /var/lib/heimdal-history fi diff --git a/debian/postrm b/debian/postrm index d5812bf..e5fec07 100755 --- a/debian/postrm +++ b/debian/postrm @@ -4,16 +4,16 @@ set -e # Purge the password history database and remove the _history user and group # on package purge. This user should not be used for any other purpose. -if [ "$1" = purge ] ; then - for file in history.db history.db.lock lengths.db lengths.db.lock ; do +if [ "$1" = purge ]; then + for file in history.db history.db.lock lengths.db lengths.db.lock; do rm -f "/var/lib/heimdal-history/$file" done deluser --quiet --system _history >/dev/null || true fi # Remove the directory for the password history database on remove if empty. -if [ "$1" = purge ] || [ "$1" = remove ] ; then - if [ -d /var/lib/heimdal-history ] ; then +if [ "$1" = purge ] || [ "$1" = remove ]; then + if [ -d /var/lib/heimdal-history ]; then rmdir --ignore-fail-on-non-empty /var/lib/heimdal-history fi fi