[debian-edu-commits] debian-edu/ 01/01: debian/educlient.postinst: Move initial user at uidNumber/gidNumber 1000 out of the way before rolling out LDAP client configuration files.

Mike Gabriel sunweaver at debian.org
Fri Nov 13 04:34:54 UTC 2015


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

sunweaver pushed a commit to branch master
in repository educlient.

commit 7c9f05215a9fc031b4b713a850485616dc8ed104
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Nov 13 05:34:48 2015 +0100

    debian/educlient.postinst: Move initial user at uidNumber/gidNumber 1000 out of the way before rolling out LDAP client configuration files.
---
 debian/educlient.postinst | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/debian/educlient.postinst b/debian/educlient.postinst
index 27b43d7..b5b147d 100755
--- a/debian/educlient.postinst
+++ b/debian/educlient.postinst
@@ -39,6 +39,19 @@ if [ "$NAME" = "Debian GNU/Linux" ]; then
 	fi
 fi
 
+# Move UID and GID of the first local user to 500
+USERN="$(grep :x:1000:1000: /etc/passwd | cut -d ":" -f 1)"
+if [ -n "${USERN}" ]; then
+	HOME="$(grep :x:1000:1000: /etc/passwd | cut -d ":" -f 6)"
+	sed -i "s/:x:1000:1000:/:x:500:500/g" /etc/passwd
+	sed -i "s/:x:1000/:x:500/g" /etc/group
+	if which nscd 1>/dev/null; then
+	    nscd -i passwd
+	    nscd -i group
+	fi
+	chown -R $USERN:$USERN "$HOME"
+fi
+
 # Divert configuration files
 ETC_DISTRIB_VERSION="/etc/educlient/etc-distrib/${DISTRIB_ID}/${DISTRIB_RELEASE}"
 ETC_DISTRIB_COMMON="/etc/educlient/etc-distrib/${DISTRIB_ID}/common"
@@ -135,19 +148,6 @@ if [ -h /etc/autofs_ldap_auth.conf ]; then
 fi
 
 
-# Move UID and GID of the first local user to 500
-USERN="$(grep :x:1000:1000: /etc/passwd | cut -d ":" -f 1)"
-if [ -n "${USERN}" ]; then
-	HOME="$(grep :x:1000:1000: /etc/passwd | cut -d ":" -f 6)"
-	sed -i "s/:x:1000:1000:/:x:500:500/g" /etc/passwd
-	sed -i "s/:x:1000/:x:500/g" /etc/group
-	if which nscd 1>/dev/null; then
-	    nscd -i passwd
-	    nscd -i group
-	fi
-	chown -R $USERN:$USERN "$HOME"
-fi
-
 echo "You really need to reboot NOW !!!"
 
 #DEBHELPER#

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/upstream/educlient.git



More information about the debian-edu-commits mailing list