From 43565e3d8f948e371d4bf952495dd69a6710e8f6 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 14 Aug 2012 08:07:41 +0200 Subject: /debian/itzks-systems-disklserver.install, sbin/diskless-workstation-shell: Move diskless-workstation-shell script into src folder (source package). --- bin/diskless-workstation-shell | 79 -------------------------------- debian/changelog | 7 +++ debian/itzks-systems-disklserver.install | 2 +- sbin/diskless-workstation-shell | 67 +++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 80 deletions(-) delete mode 100755 bin/diskless-workstation-shell create mode 100755 sbin/diskless-workstation-shell diff --git a/bin/diskless-workstation-shell b/bin/diskless-workstation-shell deleted file mode 100755 index 296ab27..0000000 --- a/bin/diskless-workstation-shell +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2011 by Mike Gabriel - -# 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 -DLW_SHELL="bash" -CHROOT="/srv/ltsp/i386/" - -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" < /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 -echo 'Note: Service restarts have been disabled in Diskless Workstation chroot' -echo 'during maintenance work.' -echo - -# disable service restarts -#test -e /sbin/start-stop-daemon.keep || mv /sbin/start-stop-daemon /sbin/start-stop-daemon.keep -#echo '#!/bin/sh' > /sbin/start-stop-daemon -#echo 'exit 0' >> /sbin/start-stop-daemon -#chmod +x /sbin/start-stop-daemon - -/bin/$DLW_SHELL - -# restore start-stop-daemon -#[ \$(stat --format '%s' /sbin/start-stop-daemon) -lt 200 ] && mv /sbin/start-stop-daemon.keep /sbin/start-stop-daemon - -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/debian/changelog b/debian/changelog index 6583cfa..51c7e3f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +itzks-systems (2012.08.09.6) UNRELEASED; urgency=low + + * /debian/itzks-systems-disklserver.install, sbin/diskless-workstation-shell: + + Move diskless-workstation-shell script into src folder (source package). + + -- Mike Gabriel Tue, 14 Aug 2012 08:06:56 +0200 + itzks-systems (2012.08.09.5) squeeze-backports; urgency=low * /debian/itzks-systems-mainserver.install: diff --git a/debian/itzks-systems-disklserver.install b/debian/itzks-systems-disklserver.install index 3415af5..02fa728 100644 --- a/debian/itzks-systems-disklserver.install +++ b/debian/itzks-systems-disklserver.install @@ -1 +1 @@ -bin/diskless-workstation-shell usr/sbin/ +sbin/diskless-workstation-shell usr/sbin/ diff --git a/sbin/diskless-workstation-shell b/sbin/diskless-workstation-shell new file mode 100755 index 0000000..627e96d --- /dev/null +++ b/sbin/diskless-workstation-shell @@ -0,0 +1,67 @@ +#!/bin/bash + +# Copyright (C) 2011 by Mike Gabriel + +# 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 +DLW_SHELL="bash" +CHROOT="/srv/ltsp/i386/" + +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" < /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 + -- cgit v1.2.3