From df8b56aab6c4b511bdca8f596300f72e02b95473 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 11 Oct 2020 23:11:16 +0200
Subject: [PATCH] Add old_server option to setup_server script.

---
 buster/apt-mark/old_server                       | 2 ++
 buster/etc_files/old_server/etc/apt/sources.list | 4 ++++
 buster/setup_scripts/setup_server.sh             | 5 +++--
 3 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 buster/apt-mark/old_server
 create mode 100644 buster/etc_files/old_server/etc/apt/sources.list

diff --git a/buster/apt-mark/old_server b/buster/apt-mark/old_server
new file mode 100644
index 0000000..c3d995b
--- /dev/null
+++ b/buster/apt-mark/old_server
@@ -0,0 +1,2 @@
+# because it contains ifconfig
+net-tools
diff --git a/buster/etc_files/old_server/etc/apt/sources.list b/buster/etc_files/old_server/etc/apt/sources.list
new file mode 100644
index 0000000..a1fbdb0
--- /dev/null
+++ b/buster/etc_files/old_server/etc/apt/sources.list
@@ -0,0 +1,4 @@
+deb http://deb.debian.org/debian stretch main contrib non-free
+deb http://deb.debian.org/debian-security/ stretch/updates main contrib non-free
+deb http://deb.debian.org/debian stretch-updates main contrib non-free
+deb http://ftp.debian.org/debian stretch-backports main contrib non-free
diff --git a/buster/setup_scripts/setup_server.sh b/buster/setup_scripts/setup_server.sh
index eefc350..fa4cc6e 100755
--- a/buster/setup_scripts/setup_server.sh
+++ b/buster/setup_scripts/setup_server.sh
@@ -4,18 +4,19 @@
 set -e
 
 # Provide maximum input for set_hostname_and_fqdn.sh.
-if [ "$#" -ne 2 ]; then
+if [ "$#" -lt 2 ]; then
     echo 'Need exactly two arguments (hostname, FQDN).'
     false
 fi
 hostname="$1"
 fqdn="$2"
+additional_arg="$3"
 
 # Set up system without user environment.
 config_tree_prefix="${HOME}/config/buster"
 setup_scripts_dir="${config_tree_prefix}/setup_scripts"
 cd "${setup_scripts_dir}"
-./setup.sh "${hostname}" "${fqdn}" server
+./setup.sh "${hostname}" "${fqdn}" server "${additional_arg}"
 
 # If we have not yet set the shell for user plom, ensure it here. This
 # is mostly for convenience.
-- 
2.30.2