[debian-edu-commits] debian-edu/ 01/01: Add script sbin/debian-edu-nscd-netgroup-cache (workaround for #791562).

Wolfgang Schweer schweer-guest at moszumanska.debian.org
Mon May 23 10:03:14 UTC 2016


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

schweer-guest pushed a commit to branch jessie
in repository debian-edu-config.

commit 929400c94765df8211048cd3528f4342ecab40dc
Author: Wolfgang Schweer <wschweer at arcor.de>
Date:   Mon May 23 12:05:43 2016 +0200

    Add script sbin/debian-edu-nscd-netgroup-cache (workaround for #791562).
---
 Makefile                            |  1 +
 debian/changelog                    |  1 +
 sbin/debian-edu-nscd-netgroup-cache | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 34 insertions(+)

diff --git a/Makefile b/Makefile
index 1b3f493..dfd6387 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ SPROGS = cfengine-debian-edu \
 	debian-edu-hwsetup \
 	debian-edu-ltsp \
 	debian-edu-ltsp-audiodivert \
+	debian-edu-nscd-netgroup-cache \
 	debian-edu-pxeinstall \
 	debian-edu-restart-services \
 	debian-edu-test-install \
diff --git a/debian/changelog b/debian/changelog
index 438b250..96ddb5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,7 @@ debian-edu-config (1.818+deb8u1) UNRELEASED; urgency=low
   [ Wolfgang Schweer ]
   * Adjust tools/subnet-change for squid3. (Closes: #800654)
   * Fix XML syntax error in gosa.conf. (Closes: #820551).
+  * Add script sbin/debian-edu-nscd-netgroup-cache (workaround for #791562).
 
  -- Petter Reinholdtsen <pere at debian.org>  Sat, 16 May 2015 23:12:06 +0200
 
diff --git a/sbin/debian-edu-nscd-netgroup-cache b/sbin/debian-edu-nscd-netgroup-cache
new file mode 100755
index 0000000..f0987af
--- /dev/null
+++ b/sbin/debian-edu-nscd-netgroup-cache
@@ -0,0 +1,32 @@
+#!/bin/bash -e
+# debian-edu-nscd-netgroup-cache
+#
+# 2016-23-05, workaround for bug #791562
+
+if [ -z $1 ] ; then
+  echo "usage: $0 (disable|enable)"
+  exit 0
+fi
+
+# Get profile.
+. /etc/debian-edu/config
+
+# Disable/enable nscd netgroup caching.
+if echo "$PROFILE" | grep -q 'Main-Server' ; then
+    systemctl stop nscd.service
+    sleep 1
+    case "$1" in
+	disable)
+	    if [ -e /var/cache/nscd/netgroup ] ; then
+		rm /var/cache/nscd/netgroup
+	    fi
+	    sed -i '/netgroup/ s=yes=no=' /etc/nscd.conf
+	;;
+	enable)
+	    sed -i '/netgroup/ s=no=yes=' /etc/nscd.conf
+	;;
+    esac
+    systemctl start nscd.service
+fi
+
+# Further information:  https://wiki.debian.org/DebianEdu/Status/Jessie

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



More information about the debian-edu-commits mailing list