chiark / gitweb /
miscellaneous debianization fixes
[disorder] / debian / postinst.disorder
index ae5e11d4e710f7ee28ec1118e1e8c8cc3ef89905..53402b55815cc448ae7d4ccadd508c8d4a74dca7 100755 (executable)
@@ -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