[debian-edu-commits] debian-edu/ 30/32: DebConf: Reset LogonGroups= in iTALC.conf on every package configuration, so DebConf configured groups get placed into iTALC.conf correctly.
Mike Gabriel
sunweaver at debian.org
Mon Aug 18 15:09:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to annotated tag debian/1_2.0.2+dfsg1-1
in repository italc.
commit 10a0c5820a5ad1038a64d55ed04b9765ddda551d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Fri Aug 15 21:32:32 2014 +0200
DebConf: Reset LogonGroups= in iTALC.conf on every package configuration, so DebConf configured groups get placed into iTALC.conf correctly.
---
debian/config/iTALC.conf.in | 6 ------
debian/italc-client.postinst | 24 +++++++++++++-----------
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/debian/config/iTALC.conf.in b/debian/config/iTALC.conf.in
index 04fac04..da48e78 100644
--- a/debian/config/iTALC.conf.in
+++ b/debian/config/iTALC.conf.in
@@ -1,9 +1,3 @@
-#debconf# CONFIGURATION TRIGGER #####
-#debconf#
-#debconf# Note: if you want to automatically have your iTALC instance re-configured via
-#debconf# debconf, then make sure you replace your existing configuration file with this
-#debconf# file.
-#debconf#
[Authentication]
KeyAuthenticationEnabled=1
LogonAuthenticationEnabled=0
diff --git a/debian/italc-client.postinst b/debian/italc-client.postinst
index 29e6392..2a42b6f 100755
--- a/debian/italc-client.postinst
+++ b/debian/italc-client.postinst
@@ -73,6 +73,12 @@ case "$1" in
if [ "$italc_create_keypairs" = "true" ]; then
+ # reset the configuration file...
+ if [ -f /etc/xdg/iTALC\ Solutions/iTALC.conf ]; then
+ sed -i /etc/xdg/iTALC\ Solutions/iTALC.conf \
+ -e 's/^LogonGroups=.*/LogonGroups="ITALC_GROUP_ADMIN,ITALC_GROUP_SUPPORTER,ITALC_GROUP_TEACHER,ITALC_GROUP_STUDENT"/'
+ fi
+
for role in admin supporter teacher; do
db_get italc-client/del-last-group-$role
@@ -130,11 +136,9 @@ case "$1" in
# role dependent manipulation of iTALC.conf
if [ -f /etc/xdg/iTALC\ Solutions/iTALC.conf ]; then
- if head -1 /etc/xdg/iTALC\ Solutions/iTALC.conf | grep "#debconf# CONFIGURATION TRIGGER" 1>/dev/null; then
- ROLE=$(echo $role | tr [a-z] [A-Z])
- sed -i /etc/xdg/iTALC\ Solutions/iTALC.conf \
- -e "s/ITALC_GROUP_$ROLE/$group/"
- fi
+ ROLE=$(echo $role | tr [a-z] [A-Z])
+ sed -i /etc/xdg/iTALC\ Solutions/iTALC.conf \
+ -e "s/ITALC_GROUP_$ROLE/$group/"
fi
if [ "$italc_key_access_for_groups" = "true" ]; then
@@ -161,12 +165,10 @@ case "$1" in
# manipulate role-independent things iTALC.conf
if [ -f /etc/xdg/iTALC\ Solutions/iTALC.conf ]; then
- if head -1 /etc/xdg/iTALC\ Solutions/iTALC.conf | grep "#debconf# CONFIGURATION TRIGGER" 1>/dev/null; then
- ROLE=$(echo $role | tr [a-z] [A-Z])
- sed -i /etc/xdg/iTALC\ Solutions/iTALC.conf \
- -e "/^#debconf#.*/d" \
- -e "s/ITALC_GROUP_STUDENT/$student_group/"
- fi
+ ROLE=$(echo $role | tr [a-z] [A-Z])
+ sed -i /etc/xdg/iTALC\ Solutions/iTALC.conf \
+ -e "/^#debconf#.*/d" \
+ -e "s/ITALC_GROUP_STUDENT/$student_group/"
fi
# Set permissions for /etc/italc/keys/public/.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/italc.git
More information about the debian-edu-commits
mailing list