[debian-edu-commits] debian-edu/italc.git (#114) - master (branch) updated: debian/1_2.0.0-3-16-g0e5ed1e

Mike Gabriel sunweaver at alioth.debian.org
Mon Aug 12 01:33:01 UTC 2013


The branch, master has been updated
       via  0e5ed1e30112eaa7a6f83d4d3cfa8d592c4c9781 (commit)
      from  ee3ac5e7d31b9a07b9654c2d9d18e2703379a489 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0e5ed1e30112eaa7a6f83d4d3cfa8d592c4c9781
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Aug 12 03:31:33 2013 +0200

    more postinst fixes...

-----------------------------------------------------------------------

Summary of changes:
 debian/italc-client.postinst |   96 +++++++++++++++++++++---------------------
 1 file changed, 49 insertions(+), 47 deletions(-)

The diff of changes is:
diff --git a/debian/italc-client.postinst b/debian/italc-client.postinst
index 614a547..3fd9e92 100755
--- a/debian/italc-client.postinst
+++ b/debian/italc-client.postinst
@@ -16,7 +16,7 @@
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
-set -e
+set -ex
 
 # Source debconf library.
 . /usr/share/debconf/confmodule
@@ -28,12 +28,47 @@ case "$1" in
 			dpkg-statoverride --add --update root root 4755 /usr/bin/italc_auth_helper
 		fi
 
-		# fetch debconf-variables for slbackup
+		# fetch debconf-variables for italc-client
 		db_get italc-client/create-keypairs && italc_create_keypairs=$RET
-		db_get italc-client/key-access-for-groups && italc_key_access_for_group=$RET
+		db_get italc-client/key-access-for-groups && italc_key_access_for_groups=$RET
 		db_get italc-client/create-groups-for-roles && italc_create_groups_for_roles=$RET
 		db_get italc-client/use-existing-groups-for-roles && italc_use_existing_groups_for_roles=$RET
 
+		# users of iTALC client
+
+		db_get italc-client/del-last-group-student
+		del_last_group="$RET"
+		if [ "$del_last_group" = "true" ]; then
+			db_get italc-client/last-group-student
+			last_group=$(echo $RET | cut -d" " -f1)
+
+			# try to remove the formerly used group for this role, on failure, ignore it
+			getent group $last_group 1>/dev/null && delgroup "$last_group" || \
+			    echo "Removing Posix group »$last_group« for role »student« failed."
+
+		fi
+
+		db_get italc-client/group-italc-student
+		# for sanity: we take everything as a group name until we fine a blank...
+		student_group=$(echo $RET | cut -d" " -f1)
+
+		if ! getent group "$student_group" 1>/dev/null; then
+			if echo "$student_group" | egrep '^[[:digit:]]{1,5}$' 1>/dev/null; then
+				student_group=""
+			fi
+		fi
+
+		if [ "$italc_create_groups_for_roles" = "true" ]; then
+			if echo "$student_group" | egrep '^[[:digit:]]{1,5}$' 1>/dev/null; then
+				echo "Specified group for role »student« is a gidNumber, not creating any group." 1>&2
+			elif ! getent group $student_group >/dev/null; then
+				echo "Creating $student_group group." 1>&2
+				addgroup --system $student_group
+			else
+				echo "Group »$student_group« already exists." 1>&2
+			fi
+		fi
+
 		# users of iTALC master
 
 		if [ "$italc_create_keypairs" = "true" ]; then
@@ -86,60 +121,27 @@ case "$1" in
 				fi
 
 				if [ "$italc_key_access_for_groups" = "true" ]; then
-					if test -f "/etc/italc/keys/private/$role/key"; then
+					if [ -f /etc/italc/keys/private/$role/key ]; then
+						chmod -Rf a-w,o-rx "/etc/italc/keys/private/$role"
 						if [ "x$group" != "x" ]; then
 							chown -Rf :$group "/etc/italc/keys/private/$role"
 						else
 							chown -Rf :root "/etc/italc/keys/private/$role"
 						fi
 					fi
-				fi
-			done
-
-			# users of iTALC client
-
-			db_get italc-client/del-last-group-student
-			del_last_group="$RET"
-			if [ "$del_last_group" = "true" ]; then
-				db_get italc-client/last-group-student
-				last_group=$(echo $RET | cut -d" " -f1)
 
-				# try to remove the formerly used group for this role, on failure, ignore it
-				getent group $last_group 1>/dev/null && delgroup "$last_group" || \
-				    echo "Removing Posix group »$last_group« for role »student« failed."
-
-			fi
-
-			db_get italc-client/group-italc-student
-			# for sanity: we take everything as a group name until we fine a blank...
-			group=$(echo $RET | cut -d" " -f1)
-
-			if ! getent group "$group" 1>/dev/null; then
-				if echo "$group" | egrep '^[[:digit:]]{1,5}$' 1>/dev/null; then
-					group=""
+					if [ -f /etc/italc/keys/public/$role/key ]; then
+						chmod -Rf a-w,o-rx "/etc/italc/keys/public/$role"
+						if [ "x$student_group" != "x" ]; then
+							chown -Rf :$student_group "/etc/italc/keys/public/$role"
+						else
+							chown -Rf :root "/etc/italc/keys/public/$role"
+						fi
+					fi
 				fi
-			fi
 
-			if [ "$italc_create_groups_for_roles" = "true" ]; then
-				if echo "$group" | egrep '^[[:digit:]]{1,5}$' 1>/dev/null; then
-					echo "Specified group for role »student« is a gidNumber, not creating any group." 1>&2
-				elif ! getent group $group >/dev/null; then
-					echo "Creating $group group." 1>&2
-					addgroup --system $group
-				else
-					echo "Group »$group« already exists." 1>&2
-				fi
-			fi
 
-			if [ "$italc_key_access_for_groups" = "true" ]; then
-				if test -f "/etc/italc/keys/public/$role/key"; then
-					if [ "x$group" != "x" ]; then
-						chown -Rf :$group "/etc/italc/keys/public/*"
-					else
-						chown -Rf :root "/etc/italc/keys/public/*"
-					fi
-				fi
-			fi
+			done
 
 		fi
 		;;


hooks/post-receive
-- 
italc.git (Debian package italc)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "italc.git" (Debian package italc).




More information about the debian-edu-commits mailing list