[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Deal with networking related issues in the autopkgtest environment

Wolfgang Schweer (@schweer-guest) gitlab at salsa.debian.org
Sat Oct 23 20:41:11 BST 2021



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


Commits:
e275c226 by Wolfgang Schweer at 2021-10-23T21:36:22+02:00
Deal with networking related issues in the autopkgtest environment

 share/debian-edu-config/tools/configure-edu-gateway:
 Drop services start, stop and restart actions, leave it to the user, add related comment

 debian/tests/configure-edu-gateway:
 Use 'no' instead of 'yes' for the firewall option to avoid a possible pitfall
 in the test environment.

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

- - - - -


3 changed files:

- debian/changelog
- debian/tests/configure-edu-gateway
- share/debian-edu-config/tools/configure-edu-gateway


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+debian-edu-config (2.12.9) UNRELEASED; urgency=medium
+
+  * Deal with networking related issues in the autopkgtest environment:
+    - share/debian-edu-config/tools/configure-edu-gateway: Drop services start,
+      stop and restart actions, leave it to the user, add related comment.
+    - debian/tests/configure-edu-gateway: Use 'no' instead of 'yes' for the
+      firewall option to avoid a possible pitfall in the test environment.
+
+ -- Wolfgang Schweer <wschweer at arcor.de>  Sat, 23 Oct 2021 20:07:07 +0200
+
 debian-edu-config (2.12.8) unstable; urgency=medium
 
   [ Wolfgang Schweer ]


=====================================
debian/tests/configure-edu-gateway
=====================================
@@ -11,4 +11,4 @@ echo "to turn this minimal system into a dedicated gateway."
 echo
 cd $AUTOPKGTEST_TMP
 PROFILE=$PROFILE DESKTOP=$DESKTOP /usr/share/debian-edu-config/tools/debian-edu-bless
-/usr/share/debian-edu-config/tools/configure-edu-gateway --firewall yes
+/usr/share/debian-edu-config/tools/configure-edu-gateway --firewall no


=====================================
share/debian-edu-config/tools/configure-edu-gateway
=====================================
@@ -47,16 +47,8 @@ EOF
 	exit 0
 fi
 
-# Warn if physical or virtual network interfaces are missing
-if ! grep eth0 /etc/network/interfaces ; then
-	rm -f /etc/network/interfaces
-	echo ""
-	echo "WARNING: This machine seems to lack network interfaces! Please check."
-	echo ""
-fi
-
 # Prevent to do this more than one time
-if ! grep -Eq 10.0.0.0 /etc/default/enable-nat && [ -f /etc/network/interfaces ]; then
+if ! grep -Eq 10.0.0.0 /etc/default/enable-nat ; then
     sed -i 's/auto eth0/auto eth0 eth1/' /etc/network/interfaces
     sed -i '/eth1/ s/dhcp/static/' /etc/network/interfaces
     sed -i '/post-up/d' /etc/network/interfaces
@@ -71,10 +63,7 @@ if ! grep -Eq 10.0.0.0 /etc/default/enable-nat && [ -f /etc/network/interfaces ]
     rm -f /etc/network/if-up.d/wpad-proxy-update
     sed -i 's/domain-name,//' /etc/dhcp/dhclient-debian-edu.conf
     sed -i 's/domain-search,//' /etc/dhcp/dhclient-debian-edu.conf
-    service networking stop
-    service networking start
     sed -i 's#NAT=#NAT="10.0.0.0/8"#' /etc/default/enable-nat
-    service enable-nat restart
     echo ""
     echo "The system has been configured as gateway."
     echo ""
@@ -117,3 +106,6 @@ if [ -e /etc/shorewall/snat ] ; then
 	echo "See https://shorewall.org/two-interface.htm#System for detailed information."
 	echo ""
 fi
+echo
+echo "Configuration finished. Please reboot the system to activate the changes."
+echo



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/e275c2266280b74da7ae58d0a563fec7ad972560

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/e275c2266280b74da7ae58d0a563fec7ad972560
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/20211023/69ecd382/attachment-0001.htm>


More information about the debian-edu-commits mailing list