summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-04-04 13:58:16 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-04-04 14:56:05 +0200
commitd94d938d1458edeaf4bfea031a5a32017a4c47b5 (patch)
tree13b82a2a96f8fc587c469ce935c9ab3e59e67359
parent4fde3dc6e2552598311b7d51f9930cbff1c513b5 (diff)
downloaditzks-systems-d94d938d1458edeaf4bfea031a5a32017a4c47b5.tar.gz
itzks-systems-d94d938d1458edeaf4bfea031a5a32017a4c47b5.tar.bz2
itzks-systems-d94d938d1458edeaf4bfea031a5a32017a4c47b5.zip
Update diskless-workstation-shell man pages, add script to chroot into buster DLW chroots.
-rw-r--r--debian/copyright1
-rw-r--r--debian/itzks-systems-disklserver.manpages2
-rw-r--r--man/diskless-workstation-shell.818
l---------man/diskless-workstation-shell.buster.81
l---------man/diskless-workstation-shell.jessie.81
l---------man/diskless-workstation-shell.stretch.81
-rwxr-xr-xsbin/diskless-workstation-shell.buster66
-rwxr-xr-xsbin/diskless-workstation-shell.jessie2
-rwxr-xr-xsbin/diskless-workstation-shell.stretch2
9 files changed, 87 insertions, 7 deletions
diff --git a/debian/copyright b/debian/copyright
index 8a25e6c..c762f22 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -154,6 +154,7 @@ Files: bin/smarttech-SMARTBoardService
README.terminalserver
README.virtman
README.workstation
+ sbin/diskless-workstation-shell.buster
sbin/itzks-filewalker
sbin/itzks-display-shell
sbin/itzks-systems.do_preseed
diff --git a/debian/itzks-systems-disklserver.manpages b/debian/itzks-systems-disklserver.manpages
index e52f2e4..1c5352c 100644
--- a/debian/itzks-systems-disklserver.manpages
+++ b/debian/itzks-systems-disklserver.manpages
@@ -1 +1 @@
-man/diskless-workstation-shell.8
+man/diskless-workstation-shell*.8
diff --git a/man/diskless-workstation-shell.8 b/man/diskless-workstation-shell.8
index d322ee0..5a22c8d 100644
--- a/man/diskless-workstation-shell.8
+++ b/man/diskless-workstation-shell.8
@@ -5,17 +5,27 @@
\\$2 \(la\\$1\(ra\\$3
..
.if \n(.g .mso www.tmac
-.TH diskless-workstation-shell 8 "July 2012" "Version 0.1" "IT-Zukunft Schule"
+.TH diskless-workstation-shell 8 "March 2019" "Version 0.3" "IT-Zukunft Schule"
.SH NAME
-diskless-workstation-shell \- Opens a shell within the ITZkS Diskless Workstation Chroot.
+diskless-workstation-shell \- Opens a shell within the ITZkS Diskless Workstation Chroot (Debian stable chroot)
.SH SYNOPSIS
'nh
.fi
.ad l
-\fBdiskless-workstation-shell\fR
+.B diskless-workstation-shell
+.br
+.B diskless-workstation-shell.jessie
+.br
+.B diskless-workstation-shell.stretch
+.br
+.B diskless-workstation-shell.buster
.SH DESCRIPTION
-This helper script opens a shell within the ITZkS diskless workstation chroot environment.
+This helper script opens a shell within the ITZkS diskless workstation chroot environment. By default, the
+Debian stable chroot is chosen.
+.PP
+If the distro version's code name is appended to the command name, the
+tool tries to chroot into a chroot of the given distro version, if available.
.PP
\fBNOTE:\fR Use this script to perform maintenance work within your ITZkS diskless workstation chroot.
.PP
diff --git a/man/diskless-workstation-shell.buster.8 b/man/diskless-workstation-shell.buster.8
new file mode 120000
index 0000000..b0d3e15
--- /dev/null
+++ b/man/diskless-workstation-shell.buster.8
@@ -0,0 +1 @@
+diskless-workstation-shell.8 \ No newline at end of file
diff --git a/man/diskless-workstation-shell.jessie.8 b/man/diskless-workstation-shell.jessie.8
new file mode 120000
index 0000000..b0d3e15
--- /dev/null
+++ b/man/diskless-workstation-shell.jessie.8
@@ -0,0 +1 @@
+diskless-workstation-shell.8 \ No newline at end of file
diff --git a/man/diskless-workstation-shell.stretch.8 b/man/diskless-workstation-shell.stretch.8
new file mode 120000
index 0000000..b0d3e15
--- /dev/null
+++ b/man/diskless-workstation-shell.stretch.8
@@ -0,0 +1 @@
+diskless-workstation-shell.8 \ No newline at end of file
diff --git a/sbin/diskless-workstation-shell.buster b/sbin/diskless-workstation-shell.buster
new file mode 100755
index 0000000..a0c3b79
--- /dev/null
+++ b/sbin/diskless-workstation-shell.buster
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# Copyright (C) 2011 by Mike Gabriel <mike.gabriel@it-zukunft-schule.de>
+
+# This script 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 script 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+set -e
+
+VERSION=0.3
+DLW_SHELL="bash"
+CHROOT="/srv/ltsp/amd64+buster/"
+
+test -e "$CHROOT" || {
+ echo "ERROR: Diskless workstation chroot does not exist at $CHROOT."
+ exit -1
+}
+
+[ "x$USER" == "xroot" ] || {
+ echo "ERROR: Diskless workstation management has to be performed as root."
+ exit -2
+}
+
+cat > "$CHROOT/dlw_shell.sh" <<EOF
+#!/bin/bash
+mount -tproc proc /proc &> /dev/null
+mount /dev/pts &> /dev/null
+export HOME=/root
+export LTSP_HANDLE_DAEMONS="false"
+
+# export the proxy server (if any) to the shell.
+export http_proxy=http://webcache.intern:3128
+export https_proxy=http://webcache.intern:3128
+export ftp_proxy=http://webcache.intern:3128
+
+echo 'This shell has been started in your Diskless Workstation chroot environment.'
+echo 'All changes performed here will take effect on your Diskless Workstations'
+echo 'after their next (re)boot. So be careful!!!'
+echo
+echo "To return from this chroot shell hit STRG+D or type ,,exit'' on the"
+echo 'command line...'
+echo
+
+/bin/$DLW_SHELL
+
+umount -l /proc &> /dev/null
+umount -l /dev/pts &> /dev/null
+
+echo
+echo "Diskless Workstation Shell has exited."
+echo
+EOF
+chmod u+x "$CHROOT/dlw_shell.sh"
+chroot "$CHROOT" /dlw_shell.sh
diff --git a/sbin/diskless-workstation-shell.jessie b/sbin/diskless-workstation-shell.jessie
index ecf5ec7..cb2bfb0 100755
--- a/sbin/diskless-workstation-shell.jessie
+++ b/sbin/diskless-workstation-shell.jessie
@@ -19,7 +19,7 @@
set -e
-VERSION=0.2
+VERSION=0.3
DLW_SHELL="bash"
CHROOT="/srv/ltsp/i386.jessie/"
diff --git a/sbin/diskless-workstation-shell.stretch b/sbin/diskless-workstation-shell.stretch
index 163c68f..a6e0063 100755
--- a/sbin/diskless-workstation-shell.stretch
+++ b/sbin/diskless-workstation-shell.stretch
@@ -19,7 +19,7 @@
set -e
-VERSION=0.2
+VERSION=0.3
DLW_SHELL="bash"
CHROOT="/srv/ltsp/amd64+stretch/"