summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-15 13:59:50 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-15 13:59:50 +0200
commitca322d1a7a44f727acdeea59fe87d060f9988f3e (patch)
tree4f6ab10753e21c112f24f81384b4daa2ceb131b5 /sbin
parent6cef2acb849067e60083a10e6903e45fbfe978b2 (diff)
downloaditzks-systems-ca322d1a7a44f727acdeea59fe87d060f9988f3e.tar.gz
itzks-systems-ca322d1a7a44f727acdeea59fe87d060f9988f3e.tar.bz2
itzks-systems-ca322d1a7a44f727acdeea59fe87d060f9988f3e.zip
New ITZkS system types: displayserver, display.
Diffstat (limited to 'sbin')
-rwxr-xr-xsbin/itzks-display-shell66
1 files changed, 66 insertions, 0 deletions
diff --git a/sbin/itzks-display-shell b/sbin/itzks-display-shell
new file mode 100755
index 0000000..db05bb8
--- /dev/null
+++ b/sbin/itzks-display-shell
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# Copyright (C) 2016 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.1
+DISPLAY_SHELL="bash"
+CHROOT="/srv/ltsp/amd64/"
+
+test -e "$CHROOT" || {
+ echo "ERROR: ITZkS display system chroot does not exist at $CHROOT."
+ exit -1
+}
+
+[ "x$USER" == "xroot" ] || {
+ echo "ERROR: ITZkS display system management has to be performed as root."
+ exit -2
+}
+
+cat > "$CHROOT/itzks_display_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/$DISPLAY_SHELL
+
+umount -l /proc &> /dev/null
+umount -l /dev/pts &> /dev/null
+
+echo
+echo "ITZkS Display System Shell has exited."
+echo
+EOF
+chmod u+x "$CHROOT/itzks_display_shell.sh"
+chroot "$CHROOT" /itzks_display_shell.sh