[debian-edu-commits] debian-edu/ 02/04: Adjust PXE menu generation to handle also the case for 64-Bit-PC.
Wolfgang Schweer
schweer-guest at moszumanska.debian.org
Mon Jan 22 19:38:53 UTC 2018
This is an automated email from the git hooks/post-receive script.
schweer-guest pushed a commit to branch master
in repository debian-edu-config.
commit 5d5a545c75379f24bcc69dd7339e6bea8d1fc6ad
Author: Wolfgang Schweer <wschweer at arcor.de>
Date: Mon Jan 22 20:33:51 2018 +0100
Adjust PXE menu generation to handle also the case for 64-Bit-PC.
Replace hardcoded i386 arch with 'ltsparch' variable with i386 default.
Add code to discover a diskless workstation LTSP chroot installation.
Add configuration file /etc/debian-edu/pxeinstall.conf with examples.
---
Makefile | 1 +
etc/debian-edu/pxeinstall.conf | 14 ++++++++++++++
sbin/debian-edu-pxeinstall | 31 ++++++++++++++++++++-----------
3 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 16e1ec0..2ddd02e 100644
--- a/Makefile
+++ b/Makefile
@@ -80,6 +80,7 @@ SYSCONFFILES = \
X11/Xsession.d/10debian-edu-one-login-per-host \
desktop-profiles/debian-edu-config.listing \
debian-edu/nightkill.conf \
+ debian-edu/pxeinstall.conf \
default/munin-node \
default/ldap2zone \
chromium/policies/managed/chromium-networked-prefs \
diff --git a/etc/debian-edu/pxeinstall.conf b/etc/debian-edu/pxeinstall.conf
new file mode 100644
index 0000000..5cdd725
--- /dev/null
+++ b/etc/debian-edu/pxeinstall.conf
@@ -0,0 +1,14 @@
+# Examples for local settings. Run 'debian-edu-pxeinstall' to regenerate
+# the PXE menu for any changes to take effect.
+
+# Default is 32-Bit-PC (aka arch i386) for the LTSP chroot.
+# Set to amd64 if 64-Bit-PC is used; needs appropriate LTSP chroot and
+# changes in LDAP, see the manual for details.
+#ltsparch=amd64
+
+# If e.g. 'apt-cacher-ng' is running on the gateway.
+#http_proxy=http://10.0.0.1:3142
+#ftp_proxy=http://10.0.0.1:3142
+
+# Set a different desktop environment for new installations.
+#desktop=mate
diff --git a/sbin/debian-edu-pxeinstall b/sbin/debian-edu-pxeinstall
index 44b3b2b..1fd9e68 100755
--- a/sbin/debian-edu-pxeinstall
+++ b/sbin/debian-edu-pxeinstall
@@ -55,6 +55,7 @@ fi
[ "$dist" ] || dist=$(lsb_release -sc)
[ "$archs" ] || archs="i386 amd64"
+[ "$ltsparch" ] || ltsparch="i386"
[ "$mirrorurl" ] || mirrorurl=http://deb.debian.org/debian
[ "$hostname" ] || hostname=pxeinstall
[ "$domain" ] || domain=intern
@@ -121,6 +122,11 @@ if [ -f /etc/debian-edu/pxeinstall.conf ] ; then
. /etc/debian-edu/pxeinstall.conf
fi
+# Start from a clean state if run after LTSP chroot arch changes.
+if [ -d $tftpdir/debian-edu ] ; then
+ rm -rf $tftpdir/debian-edu
+fi
+
[ -d $tftpdir ] || mkdir $tftpdir
[ -d $tftpdir/debian-edu ] || mkdir $tftpdir/debian-edu
@@ -276,37 +282,40 @@ LABEL memtest86
EOF
fi
-if [ -d /var/lib/tftpboot/ltsp/i386 ] ; then
- ltsproot=/opt/ltsp/i386
+if [ -d /var/lib/tftpboot/ltsp/$ltsparch ] ; then
+ ltsproot=/opt/ltsp/$ltsparch
cat <<EOF > $tftpdir/debian-edu/ltsp-thin.cfg
LABEL ltsp-thin
MENU LABEL LTSP ^thin client
- KERNEL ltsp/i386/vmlinuz
- APPEND initrd=ltsp/i386/initrd.img init=/sbin/init-ltsp root=/dev/nbd0 ro LTSP_FATCLIENT=False quiet
+ KERNEL ltsp/$ltsparch/vmlinuz
+ APPEND initrd=ltsp/$ltsparch/initrd.img init=/sbin/init-ltsp root=/dev/nbd0 ro LTSP_FATCLIENT=False quiet
IPAPPEND 2
EOF
cat > $tftpdir/debian-edu/default-thin.cfg <<EOF
-DEFAULT ltsp/i386/vmlinuz initrd=ltsp/i386/initrd.img init=/sbin/init-ltsp root=/dev/nbd0 ro LTSP_FATCLIENT=False quiet ipappend 2
+DEFAULT ltsp/$ltsparch/vmlinuz initrd=ltsp/$ltsparch/initrd.img init=/sbin/init-ltsp root=/dev/nbd0 ro LTSP_FATCLIENT=False quiet ipappend 2
EOF
# See if LTSP also have diskless workstation support
- if [ -e $ltsproot/lib/i386-linux-gnu/security/pam_krb5.so ] || \
- [ -e $ltsproot/lib/i386-linux-gnu/security/pam_ldap.so ] || \
- [ -e $ltsproot/lib/i386-linux-gnu/security/pam_sss.so ] ; then
+ if [ -e $ltsproot/lib/x86_64-linux-gnu/security/pam_krb5.so -a "amd64" = $ltsparch ] || \
+ [ -e $ltsproot/lib/x86_64-linux-gnu/security/pam_ldap.so -a "amd64" = $ltsparch ] || \
+ [ -e $ltsproot/lib/x86_64-linux-gnu/security/pam_sss.so -a "amd64" = $ltsparch ] || \
+ [ -e $ltsproot/lib/i386-linux-gnu/security/pam_krb5.so -a "i386" = $ltsparch ] || \
+ [ -e $ltsproot/lib/i386-linux-gnu/security/pam_ldap.so -a "i386" = $ltsparch ] || \
+ [ -e $ltsproot/lib/i386-linux-gnu/security/pam_sss.so -a "i386" = $ltsparch ] ; then
cat <<EOF > $tftpdir/debian-edu/ltsp-diskless.cfg
LABEL ltsp-diskless
MENU LABEL LTSP ^diskless workstation
- KERNEL ltsp/i386/vmlinuz
- APPEND initrd=ltsp/i386/initrd.img init=/sbin/init-ltsp root=/dev/nbd0 ro quiet
+ KERNEL ltsp/$ltsparch/vmlinuz
+ APPEND initrd=ltsp/$ltsparch/initrd.img init=/sbin/init-ltsp root=/dev/nbd0 ro quiet
IPAPPEND 2
EOF
cat > $tftpdir/debian-edu/default-diskless.cfg <<EOF
-DEFAULT ltsp/i386/vmlinuz initrd=ltsp/i386/initrd.img init=/sbin/init-ltsp root=/dev/nbd0 ro quiet ipappend 2
+DEFAULT ltsp/$ltsparch/vmlinuz initrd=ltsp/$ltsparch/initrd.img init=/sbin/init-ltsp root=/dev/nbd0 ro quiet ipappend 2
EOF
fi
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git
More information about the debian-edu-commits
mailing list