aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-07-08 16:30:39 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-07-08 16:34:16 +0200
commitdfca92846c0a77442f4024fef11c4ffc819ae051 (patch)
tree5c76a77b82ce71082a5ca2fa4af0ee31230e214b
parent77349f46aaf7109334be6421cde7a7ccd55090a3 (diff)
downloaddebian-edu-fai+itzks-dfca92846c0a77442f4024fef11c4ffc819ae051.tar.gz
debian-edu-fai+itzks-dfca92846c0a77442f4024fef11c4ffc819ae051.tar.bz2
debian-edu-fai+itzks-dfca92846c0a77442f4024fef11c4ffc819ae051.zip
Add ROAMING_WORKSTATION support.
-rw-r--r--fai/config/class/debian-edu.profile16
-rw-r--r--fai/config/debconf/ROAMING_WORKSTATION3
-rwxr-xr-xfai/config/hooks/instsoft.ROAMING_WORKSTATION6
-rw-r--r--fai/config/package_config/ROAMING_WORKSTATION5
-rwxr-xr-xfai/config/scripts/ROAMING_WORKSTATION/10-update-debian-edu-config11
-rwxr-xr-xfai/config/scripts/ROAMING_WORKSTATION/80-fix-ldap-access19
6 files changed, 58 insertions, 2 deletions
diff --git a/fai/config/class/debian-edu.profile b/fai/config/class/debian-edu.profile
index cdad6af..c37daa5 100644
--- a/fai/config/class/debian-edu.profile
+++ b/fai/config/class/debian-edu.profile
@@ -8,18 +8,30 @@ Use this installation profile for server-like systems that do not
need a graphical login.
Classes: INSTALL FAIBASE DEBIAN EDU LVM LVM_EDU NONFREE
-Name: Edu/MATE
+Name: Edu+Workstation/MATE
Description: Debian Edu workstation, powered by Mate Desktop
Short: Debian Edu workstation with Mate desktop will be installed
Long: Debian Edu workstation with Mate desktop will be installed.
Classes: INSTALL FAIBASE DEBIAN EDU WORKSTATION XORG MATE LVM LVM_EDU NONFREE
-Name: Edu/GNOME
+Name: Edu+Roaming-Workstation/MATE
+Description: Debian Edu roaming workstation, powered by Mate Desktop
+Short: Debian Edu roaming workstation with Mate desktop will be installed
+Long: Debian Edu roaming workstation with Mate desktop will be installed.
+Classes: INSTALL FAIBASE DEBIAN EDU ROAMING_WORKSTATION XORG MATE LVM LVM_EDU_ROAMING NONFREE
+
+Name: Edu+Workstation/GNOME
Description: Debian Edu workstation, powered by Gnome Desktop
Short: Debian Edu workstation with Gnome desktop will be installed
Long: Debian Edu workstation with Gnome desktop will be installed.
Classes: INSTALL FAIBASE DEBIAN EDU WORKSTATION XORG GNOME LVM LVM_EDU NONFREE
+Name: Edu+Roaming-Workstation/GNOME
+Description: Debian Edu roaming workstation, powered by Gnome Desktop
+Short: Debian Edu roaming workstation with Gnome desktop will be installed
+Long: Debian Edu roaming workstation with Gnome desktop will be installed.
+Classes: INSTALL FAIBASE DEBIAN EDU ROAMING_WORKSTATION XORG GNOME LVM LVM_EDU_ROAMING NONFREE
+
Name: Edu/XFCE
Description: Debian Edu workstation, powered by Xfce Desktop
Short: Debian Edu workstation with Xfce desktop will be installed
diff --git a/fai/config/debconf/ROAMING_WORKSTATION b/fai/config/debconf/ROAMING_WORKSTATION
new file mode 100644
index 0000000..6d0b6f9
--- /dev/null
+++ b/fai/config/debconf/ROAMING_WORKSTATION
@@ -0,0 +1,3 @@
+# All non-default debconf answers for workstation installation
+
+sitesummary-client sitesummary-client/hostclass string workstation
diff --git a/fai/config/hooks/instsoft.ROAMING_WORKSTATION b/fai/config/hooks/instsoft.ROAMING_WORKSTATION
new file mode 100755
index 0000000..bf0032a
--- /dev/null
+++ b/fai/config/hooks/instsoft.ROAMING_WORKSTATION
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# tag Debian Edu machine as a roaming workstation
+if [ -f $target/etc/debian-edu/config ]; then
+ sed -i $target/etc/debian-edu/config -e "s/^PROFILE=.*$/PROFILE=\"Roaming-Workstation\"/"
+fi
diff --git a/fai/config/package_config/ROAMING_WORKSTATION b/fai/config/package_config/ROAMING_WORKSTATION
new file mode 100644
index 0000000..ed3583b
--- /dev/null
+++ b/fai/config/package_config/ROAMING_WORKSTATION
@@ -0,0 +1,5 @@
+PACKAGES install
+host ldap-utils
+libpam-mklocaluser
+libpam-sss libnss-sss
+libnss-myhostname libnss-mdns libnss-ldapd
diff --git a/fai/config/scripts/ROAMING_WORKSTATION/10-update-debian-edu-config b/fai/config/scripts/ROAMING_WORKSTATION/10-update-debian-edu-config
new file mode 100755
index 0000000..3eea4b9
--- /dev/null
+++ b/fai/config/scripts/ROAMING_WORKSTATION/10-update-debian-edu-config
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# tag Debian Edu machine as a roaming workstation
+if [ -f $target/etc/debian-edu/config ]; then
+ sed -i $target/etc/debian-edu/config -e "s/^PROFILE=.*$/PROFILE=\"Roaming-Workstation\"/"
+
+ # reconfigure debian-edu-install to get desktop profiles right
+ export DEBIAN_FRONTEND=noninteractive
+ chroot $target dpkg-reconfigure debian-edu-install
+ unset DEBIAN_FRONTEND
+fi
diff --git a/fai/config/scripts/ROAMING_WORKSTATION/80-fix-ldap-access b/fai/config/scripts/ROAMING_WORKSTATION/80-fix-ldap-access
new file mode 100755
index 0000000..1a3d7d5
--- /dev/null
+++ b/fai/config/scripts/ROAMING_WORKSTATION/80-fix-ldap-access
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if ! grep -qE "^HOST tjener\.intern$" $target/etc/ldap/ldap.conf; then
+
+ # append special TLS rules, Base DN, etc. for tjener.intern
+
+ cat <<EOF >> $target/etc/ldap/ldap.conf
+
+HOST tjener.intern
+sudoers_base ou=sudoers,dc=skole,dc=skolelinux,dc=no
+BASE dc=skole,dc=skolelinux,dc=no
+TLS_REQCERT demand
+TLS_CACERT /etc/ssl/certs/debian-edu-server.crt
+EOF
+
+ # this should give roaming workstations access to TJENER's LDAP,
+ # if needed.
+
+fi