[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] 6 commits: Remove NBD tools and related configuration file

Wolfgang Schweer gitlab at salsa.debian.org
Mon Aug 31 09:32:28 BST 2020



Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
6d9c4e66 by Wolfgang Schweer at 2020-08-31T09:53:08+02:00
Remove NBD tools and related configuration file

The re-written LTSP doesn't use nbdswapd, so drop now obsolete files
 - share/debian-edu-config/tools/nbdquery
 - share/debian-edu-config/tools/nbdswap-cleanup
 - etc/nbd-server/conf.d/debian-edu.conf

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
f5ca1efa by Wolfgang Schweer at 2020-08-31T09:55:54+02:00
Adjust Makefile to reflect NBD tools removal

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
360f8899 by Wolfgang Schweer at 2020-08-31T10:01:17+02:00
Add NBD tools removal related entries to d/changelog

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
a87d6f0c by Wolfgang Schweer at 2020-08-31T10:18:07+02:00
d/control: Drop Depends on netcat. (Closes: #969239)

The last tool using 'nc' has now been removed. Thanks to Chris Hofstaedtler.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
9b3de98f by Wolfgang Schweer at 2020-08-31T10:24:14+02:00
Cleanup Makefile from erroneously added entry

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
f81c7077 by Wolfgang Schweer at 2020-08-31T10:30:38+02:00
Cleanup debian/debian-edu-config.lintian-overrides from unused entries

Thanks Lintian.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -


7 changed files:

- Makefile
- debian/changelog
- debian/control
- debian/debian-edu-config.lintian-overrides
- − etc/nbd-server/conf.d/debian-edu.conf
- − share/debian-edu-config/tools/nbdquery
- − share/debian-edu-config/tools/nbdswap-cleanup


Changes:

=====================================
Makefile
=====================================
@@ -154,8 +154,7 @@ SYSCONFFILES = \
 	nagios3/debian-edu/service_templates.cfg \
 	nagios3/debian-edu/timeperiods.cfg \
 	munin/debian-edu-munin-node.conf \
-	polkit-1/localauthority.conf.d/80-edu-admin.conf \
-	nbd-server/conf.d/debian-edu.conf
+	polkit-1/localauthority.conf.d/80-edu-admin.conf
 
 SYSCONFSCRIPTS = \
 	mklocaluser.d/20-debian-edu-config \
@@ -311,8 +310,6 @@ install: install-testsuite
 		share/debian-edu-config/tools/logoutkill.sh \
 		share/debian-edu-config/tools/missing-desktop-file \
 		share/debian-edu-config/tools/movehome \
-		share/debian-edu-config/tools/nbdquery \
-		share/debian-edu-config/tools/nbdswap-cleanup \
 		share/debian-edu-config/tools/nightkill.sh \
 		share/debian-edu-config/tools/notify-local-users \
 		share/debian-edu-config/tools/package-disk-usage \


=====================================
debian/changelog
=====================================
@@ -1,3 +1,19 @@
+debian-edu-config (2.11.30) UNRELEASED; urgency=medium
+
+  * Remove NBD tools and related configuration file:
+    The re-written LTSP doesn't use nbdswapd, so drop now obsolete files
+    share/debian-edu-config/tools/nbdquery,
+    share/debian-edu-config/tools/nbdswap and
+    etc/nbd-server/conf.d/debian-edu.conf.
+  * Adjust Makefile.
+  * Cleanup debian/debian-edu-config.lintian-overrides from unused entries,
+    thanks Lintian.
+
+  * d/control: Drop Depends on netcat. (Closes: #969239)
+    The last tool using 'nc' has now been removed. Thanks to Chris Hofstaedtler.
+
+ -- Wolfgang Schweer <wschweer at arcor.de>  Mon, 31 Aug 2020 09:57:45 +0200
+
 debian-edu-config (2.11.29) unstable; urgency=medium
 
   [ Wolfgang Schweer ]


=====================================
debian/control
=====================================
@@ -51,7 +51,6 @@ Depends: ${misc:Depends},
          lsb-release,
          mime-support,
          net-tools,
-         netcat,
          ng-utils,
          openssl,
          patch,


=====================================
debian/debian-edu-config.lintian-overrides
=====================================
@@ -2,8 +2,6 @@ debian-edu-config binary: script-not-executable etc/dhcp/dhclient-exit-hooks.d/a
 debian-edu-config binary: script-not-executable etc/dhcp/dhclient-exit-hooks.d/fetch-ldap-cert
 debian-edu-config binary: script-not-executable etc/dhcp/dhclient-exit-hooks.d/hostname
 debian-edu-config binary: script-not-executable etc/dhcp/dhclient-exit-hooks.d/wpad-proxy-update
-debian-edu-config binary: script-not-executable etc/network/if-up.d/hostname
-debian-edu-config binary: script-not-executable etc/network/if-up.d/wpad-proxy-update
 debian-edu-config binary: non-standard-apache2-configuration-name debian-edu-config-doc.conf != debian-edu-config.conf
 debian-edu-config binary: debconf-is-not-a-registry usr/bin/ldap-debian-edu-install
 debian-edu-config binary: debconf-is-not-a-registry usr/share/debian-edu-config/d-i/finish-install
@@ -11,5 +9,4 @@ debian-edu-config binary: debconf-is-not-a-registry usr/share/debian-edu-config/
 debian-edu-config binary: debconf-is-not-a-registry usr/share/debian-edu-config/tools/kerberos-kdc-init
 debian-edu-config binary: debconf-is-not-a-registry usr/share/debian-edu-config/tools/edu-icinga-setup
 debian-edu-config binary: remove-of-unknown-diversion usr/bin/gtick postrm:18
-debian-edu-config binary: uses-dpkg-database-directly etc/cron.d/debian-edu-config
 debian-edu-config binary: uses-dpkg-database-directly usr/share/debian-edu-config/tools/edu-ltsp-install


=====================================
etc/nbd-server/conf.d/debian-edu.conf deleted
=====================================
@@ -1,5 +0,0 @@
-[swap]
-exportname = /var/opt/ltsp/swapfiles/%s
-prerun = nbdswapd %s
-postrun = rm -f %s
-authfile =


=====================================
share/debian-edu-config/tools/nbdquery deleted
=====================================
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# Copyright 2007 Ronny Aasen <ronny at skolelinux.no>
-# Distributed under the terms of the GNU General Public License
-# version 2 or any later version.
-
-# queries the nbd-clients and reports what source ports it uses to
-# stdout.  should usually be run from an inetd. unfortunatly because
-# of lsof it needs to run as root
-
-PATH=/bin:/usr/bin
-export PATH
-
-for pid in $(pidof nbd-client) ; do
-   port=$(lsof -P -p $pid 2>/dev/null | grep 9572 | cut -d":" -f2 | cut -d"-" -f1)
-   echo $port
-done


=====================================
share/debian-edu-config/tools/nbdswap-cleanup deleted
=====================================
@@ -1,90 +0,0 @@
-#!/bin/bash
-
-# Copyright 2007 Ronny Aasen <ronny at skolelinux.no>
-# Distributed under the terms of the GNU General Public License
-# version 2 or any later version.
-
-# compare the files in the swapdir, vs the running processes, vs the
-# alive ltsp clients.  and remove the cruft UGLY UGLY remove all this
-# when nbd-server is sane.
-
-#set -x 
-
-PATH=/bin:/usr/bin
-export PATH
-
-# exit if its already running
-# (this shouldnt happen - but will happen if lsof hangs)
-if ps fax | egrep -v "grep|^ *$$" | grep -q $0 ; then
-    exit 0
-fi
-
-#known language
-LANG=C
-export $LANG
-
-NBDQUERY_PORT=9211
-export NBDQUERY_PORT
-
-#only run if the services are installed.
-test -x /usr/sbin/nbdswapd || exit 0
-test -x /bin/nbd-server || exit 0
-
-#only run if there is a SWAPDIR configured. 
-test ! -r /etc/ltsp/nbdswapd.conf || . /etc/ltsp/nbdswapd.conf
-if [ ${SWAPDIR:-0} = "0" ] ; then 
-        exit 0
-fi
-
-
-#remove files not owned by any process, eg after a powerfailure. 
-for file in $SWAPDIR/??????  ; do
-   if [ -f $file ] ; then
-       ps aux | grep -v grep | grep nbd-server | grep -q $file || rm $file
-   fi
-done
-
-# Query the ltsp client on port 9211 to get a list of ports in use by
-# nbd-clients.  stop nbd-server processes with no clients running,
-# they can safely be removed.
-
-pids=$(ps ax -o pid,args | grep -v grep | grep ' /usr/sbin/nbdswapd' | awk '{print $1}' )
-for pid in $pids ; do
-	# in case there are no nbdswapds running
-	if [ ${pid:-0} -ne "0" ]; then
-		#get the ports in use by nbdswapd
-		for l_port in $(lsof -w  -P -p $pid | grep 9572 | grep TCP | head -n 1 | cut -d":" -f3 | cut -d" " -f1) ; do
-			#figure out the ltps client hostname 
-			host=$(lsof -w -P -p $pid | grep 9572 | grep TCP | head -n 1 | cut -d":" -f2 | cut -d">" -f2)
-			
-			#query the ltsp host for the nbd-client ports in use 
-		 	r_port=$(nc $host $NBDQUERY_PORT 2>/dev/null || echo fail )
-			#if host was unreachable (power off/network failure)
-			if [ ${r_port} = "fail" ] ; then
-				#kill all nbd's for this host
-				for nbds_pid in $(ps ax --no-heading -o pid,ppid,args| grep $pid | grep -v grep | grep nbd-server | awk '{print $1}'); do
-					#kill this nbd-server
-					#it will take it's file and go. 
-					kill -1 $nbds_pid
-				done
-
-			else   
-				#if we got a reply
-				if [ ${r_port:-0} -ne "0" ]; then
-					#keep if it matches
-					if [ "$l_port" -ne  "$r_port" ]; then 
-						#what nbd-server is child of this nbdswapd
-						for nbds_pid in $(ps ax --no-heading -o pid,ppid,args| grep $pid | grep -v grep | grep nbd-server | awk '{print $1}'); do
-						#kill this nbd-server
-						#it will take it's file and go. 
-							kill -1 $nbds_pid
-						done
-					fi
-				fi
-			fi
-		done
-	fi
-done
-
-exit 0 
-



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/a6c2d55182d0b61d4274e6223e7ea4e4fc971d02...f81c70774977dea4f2dbc15caeead31e473a39f5

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/a6c2d55182d0b61d4274e6223e7ea4e4fc971d02...f81c70774977dea4f2dbc15caeead31e473a39f5
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20200831/7d9e113a/attachment-0001.html>


More information about the debian-edu-commits mailing list