[nethack] 15/31: nethack-common.postinst: minor simplifications

James Cowgill jcowgill-guest at moszumanska.debian.org
Mon Mar 7 17:54:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

jcowgill-guest pushed a commit to branch master
in repository nethack.

commit 721e2a5fd0e3be5f046cfc8d58ba668686f2be0d
Author: James Cowgill <james410 at cowgill.org.uk>
Date:   Fri Mar 4 22:04:23 2016 +0000

    nethack-common.postinst: minor simplifications
    
    - Simplify "recover" script handling
    - Convert tabs to spaces for consistency
---
 debian/nethack-common.postinst | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/debian/nethack-common.postinst b/debian/nethack-common.postinst
index bed9013..08d9040 100644
--- a/debian/nethack-common.postinst
+++ b/debian/nethack-common.postinst
@@ -28,32 +28,30 @@ if [ "$1" = "configure" ]; then
     db_get nethack-common/recover-setgid
 
     if [ "$RET" = false ]; then
-      # Remove the statoverride that may have been left over from other
+      # Remove the statoverride that may have been left over from previous
       # configurations
       if dpkg-statoverride --list /usr/lib/games/nethack/recover >/dev/null
       then
         dpkg-statoverride --remove /usr/lib/games/nethack/recover
       fi
-      
-      # Just in case
+
+      # Remove setgid bit
       chmod 755 /usr/lib/games/nethack/recover
     else
       if ! dpkg-statoverride --list /usr/lib/games/nethack/recover >/dev/null
       then
-        dpkg-statoverride --add root games 2755 /usr/lib/games/nethack/recover
+        dpkg-statoverride --update --add root games 2755 /usr/lib/games/nethack/recover
       fi
-      
-      chmod 2755 /usr/lib/games/nethack/recover
     fi
-    
+
     db_stop
-    
+
     for file in perm record logfile; do
       if [ ! -e /var/games/nethack/$file ]; then
-		touch /var/games/nethack/$file
-		chmod 0664 /var/games/nethack/$file
-		chown root:games /var/games/nethack/$file
-	  fi
+        touch /var/games/nethack/$file
+        chmod 0664 /var/games/nethack/$file
+        chown root:games /var/games/nethack/$file
+      fi
     done
 
     # stale rc.d file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/nethack.git



More information about the Pkg-games-commits mailing list