X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/b2e75cd06f27b69b292e811513c79532549a54aa..07184dd3deba9009e4c4391ef711a62aa57eb536:/debian/postinst.disorder diff --git a/debian/postinst.disorder b/debian/postinst.disorder index ae5e11d..53402b5 100755 --- a/debian/postinst.disorder +++ b/debian/postinst.disorder @@ -1,7 +1,7 @@ #! /bin/sh # # This file is part of DisOrder -# Copyright (C) 2004 Richard Kettlewell +# Copyright (C) 2004, 2007 Richard Kettlewell # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,15 +44,16 @@ configure ) add_jukebox_user fi if test ! -f /etc/disorder/config.private; then - # pwgen in debian stable has insane exit status - set +e rootpw=`pwgen 16 1` webpw=`pwgen 16 1` - set -e if test -z "$rootpw" || test -z "$webpw"; then + # We used to ignore the exit status of pwgen due to a bug in an old + # version of Debian. That bug seems to be gone, but this check is + # harmless and could catch future bugs. echo "$0: pwgen failed" 1>&2 exit 1 fi + # We set the umask so that private files aren't transiently world-readable u=`umask` umask 077 @@ -82,11 +83,7 @@ configure ) chown jukebox:jukebox /var/lib/disorder configure_init_d restart_server - if test ! -e /etc/disorder/http.users; then - touch /etc/disorder/http.users - fi db_stop - ldconfig -n /usr/lib ;; abort-upgrade ) /etc/init.d/disorder restart