[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Remove configure-edu-gateway

Mike Gabriel (@sunweaver) gitlab at salsa.debian.org
Tue Aug 15 15:17:28 BST 2023



Mike Gabriel pushed to branch master at Debian Edu / debian-edu-config


Commits:
e6560d37 by Guido Berhoerster at 2023-08-11T14:56:08+02:00
Remove configure-edu-gateway

The script is obsoleted by the the more sophisticated configuration abilities
provided by the debian-edu-router-config package.
Closes: #1043407

- - - - -


3 changed files:

- Makefile
- − debian/tests/configure-edu-gateway
- − share/debian-edu-config/tools/configure-edu-gateway


Changes:

=====================================
Makefile
=====================================
@@ -289,7 +289,6 @@ install: install-testsuite
 		share/debian-edu-config/killer.cron \
 		share/debian-edu-config/tools/passwd \
 		share/debian-edu-config/tools/clean-up-host-keytabs \
-		share/debian-edu-config/tools/configure-edu-gateway \
 		share/debian-edu-config/tools/create-debian-edu-certs \
 		share/debian-edu-config/tools/create-server-cert \
 		share/debian-edu-config/tools/cups-queue-autoflush \


=====================================
debian/tests/configure-edu-gateway deleted
=====================================
@@ -1,14 +0,0 @@
-#!/bin/sh
-set -e
-
-export LC_ALL=C
-export PROFILE=Minimal
-export DESKTOP=none
-
-echo
-echo "Install Debian Edu chroot using profile $PROFILE, then run a script"
-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 no


=====================================
share/debian-edu-config/tools/configure-edu-gateway deleted
=====================================
@@ -1,111 +0,0 @@
-#!/bin/sh
-#
-# Configure a Debian Edu system with 'Minimal' profile' to act as as gateway.
-
-# The configuration below applies to a Debian Edu machine in the internal
-# backbone network with two NICs, the eth0 interface attached to an existing
-# router and the eth1 one attached to the backbone network 10.0.0.0/8.
-#
-# Author/Copyright:	Wolfgang Schweer <wschweer at arcor.de>
-# Licence:			GPL2+
-# first edited:		2020-04-17
-# last edited:		2021-10-22
-# 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-set -e
-
-# usage
-if [ -z "$1" ] ; then
-	echo "Use $0 -h or $0 --help for more information"
-	exit 0
-fi
-
-if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
-	cat <<EOF
-
-Usage information:
-
-$0 --firewall <yes|no>
-
-Turn a Debian Edu system with profile 'Minimal' into a gateway.
-
-'$0 --firewall no' configures this system as gateway.
-
-'$0 --firewall yes' installs the 'shorewall' package in addition and
-   configures this system also as a firewall.
-   See https://shorewall.org/two-interface.htm#System for detailed information.
-EOF
-	exit 0
-fi
-
-# Prevent to do this more than one time
-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
-    echo 'address 10.0.0.1' >> /etc/network/interfaces
-    echo 'dns-nameservers 10.0.2.2' >> /etc/network/interfaces
-    echo 'dns-domain intern' >> /etc/network/interfaces
-    hostname -b gateway
-    hostname > /etc/hostname
-    rm -f /etc/dhcp/dhclient-exit-hooks.d/hostname
-    rm -f /etc/dhcp/dhclient-exit-hooks.d/wpad-proxy-update
-    rm -f /etc/dhcp/dhclient-exit-hooks.d/fetch-ldap-cert
-    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
-    sed -i 's#NAT=#NAT="10.0.0.0/8"#' /etc/default/enable-nat
-    echo ""
-    echo "The system has been configured as gateway."
-    echo ""
-else
-    echo ""
-    echo "The system has already been configured as gateway."
-    echo ""
-fi
-
-# Optionally install, configure, enable and start shorewall.
-if [ "yes" = "$2" ] && [ ! -d /etc/shorewall ] ; then
-    echo ""
-    echo "Now setting up shorewall like requested."
-    echo ""
-	if grep -q / /etc/debian_version ; then
-		dist=$(cat /etc/debian_version | cut -d/ -f1)
-	else
-		dist=$(lsb_release -sc)
-	fi
-	if egrep -q '^deb cdrom:' /etc/apt/sources.list ; then
-		sed -i 's/deb cdrom/#deb cdrom/' /etc/apt/sources.list
-		echo "deb http://deb.debian.org/debian $dist main" >> /etc/apt/sources.list
-	fi
-	apt update
-	apt -yq install shorewall
-	for i in interfaces policy rules snat stoppedrules zones ; do
-		cp /usr/share/doc/shorewall/examples/two-interfaces/$i /etc/shorewall
-	done
-	echo "NET_IF=eth0" >> /etc/shorewall/params
-	echo "NET_OPTIONS=routefilter,norfc1918" >> /etc/shorewall/params
-	systemctl enable shorewall
-	systemctl start shorewall
-fi
-
-# Give feedback
-if [ -e /etc/shorewall/snat ] ; then
-	echo ""
-	echo "Shorewall has been configured for the two-interfaces setup on this system."
-	echo ""
-	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/e6560d37181cd70be9ce9673620314a15defcfa3

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/e6560d37181cd70be9ce9673620314a15defcfa3
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/20230815/1c6834f8/attachment-0001.htm>


More information about the debian-edu-commits mailing list