[X2Go-Commits] [live-build-x2go] 86/166: renamed files; delete old names from git

git-admin at x2go.org git-admin at x2go.org
Mon Nov 20 02:16:52 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch feature/mate-minidesktop
in repository live-build-x2go.

commit f47395469335b44d6183b4699c87973a3982f331
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Sun Jul 23 14:46:36 2017 +0200

    renamed files; delete old names from git
---
 .../lib/live/config/2000-showifconfig              |  43 --
 .../includes.chroot/lib/live/config/2100-lockuser  |  20 -
 .../lib/live/config/2150-getsshpubkeysfromserver   |  55 ---
 .../lib/live/config/2200-xserver-xorg-getxorgconf  |  45 ---
 .../lib/live/config/2300-live-autoupdate           | 439 ---------------------
 .../live/config/2400-x2go-getportableappsessions   |  23 --
 .../config/2410-x2go-getopensshportableclientkey   |  46 ---
 .../includes.chroot/lib/live/config/2500-tcpprint  |  76 ----
 .../lib/live/config/2600-x2go-getsessions          |  49 ---
 9 files changed, 796 deletions(-)

diff --git a/config/includes.chroot/lib/live/config/2000-showifconfig b/config/includes.chroot/lib/live/config/2000-showifconfig
deleted file mode 100755
index 9467e47..0000000
--- a/config/includes.chroot/lib/live/config/2000-showifconfig
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-ShowIFConfig ()
-{
-
-# Output startup message
-#
-echo -n " showifconfig"
-
-# wait until terminal is available
-while ! [ -c /dev/tty$(fgconsole -n) ] ; do
-	sleep 10
-done
-
-# Make sure no language-specific stuff interferes with our matching
-# grep: highlight everything that matches "inet" to the end of its line
-# and also (-E, |$) show every line that has an end => Everything else
-cat >/etc/network/if-up.d/0100-showips <<SHOWIPS
-#!/bin/bash
-export TERM=linux;
-
-while [ -z "\$(hostname -I)" ] ; do
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n)
-	sleep 2
-done
-
-IPMSG=\$(LANG=C \
-/sbin/ip a | \
-/bin/grep -P --color=always "inet.*? [\. 0-9a-f:/]*? |$" | \
-GREP_COLOR="1;32" \
-/bin/grep -P --color=always "link/ether .*? |$" ); \
-IPMSG=\$( sed 's/^/- /' <<< "\$IPMSG" ); 
-sed -i '/^- /d' /etc/issue; 
-sed -i '/^- /d' /etc/issue.net; 
-echo "\$IPMSG" >> /etc/issue; 
-echo "\$IPMSG" >> /etc/issue.net
-SHOWIPS
-
-chmod 755 /etc/network/if-up.d/0100-showips
-
-}
-
-ShowIFConfig
diff --git a/config/includes.chroot/lib/live/config/2100-lockuser b/config/includes.chroot/lib/live/config/2100-lockuser
deleted file mode 100755
index 1cbcc15..0000000
--- a/config/includes.chroot/lib/live/config/2100-lockuser
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-LockUser ()
-{
-
-# Output startup message
-#
-echo -n " lockuser"
-
-
-# Set password
-#
-if grep -q "\W*nouser\W*" /proc/cmdline ; then
-	passwd -l user >/dev/null
-fi
-
-}
-
-LockUser
-
diff --git a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver b/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver
deleted file mode 100755
index 21f0c31..0000000
--- a/config/includes.chroot/lib/live/config/2150-getsshpubkeysfromserver
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-GetSSHPubKeysFromServer ()
-{
-
-	# Output startup message
-	#
-	echo -n " getsshpubkeysfromserver"
-
-
-	PUBKEYURL=$(cat /proc/cmdline | \
-		    tr ' ' '\n' | \
-		    awk -F'=' ' /^pubkey=/ { print $2 }')
-
-	if [ -n "$PUBKEYURL" ] ; then
-		cat >/etc/network/if-up.d/0200-getsshpubkeysfromserver <<GETPUBKEY
-#!/bin/bash
-export TERM=linux;
-
-while [ -z "\$(hostname -I)" ] ; do
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n)
-	sleep 2
-done
-
-# Set Keyfile
-#
-mkdir -p /root/.ssh
-chmod 600 /root/.ssh
-touch /root/.ssh/authorized_keys
-chmod 600 /root/.ssh/authorized_keys
-
-if echo "$PUBKEYURL" | grep -q "^tftp://" ; then
-	PUBKEYSERVER=$(echo "$PUBKEYURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' )
-	PUBKEYPATH=$(echo "$PUBKEYURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
-	if [ -n "\$PUBKEYSERVER" ] && [ -n "\$PUBKEYPATH" ] ; then
-		while ! atftp $PUBKEYSERVER -g -r $PUBKEYPATH -l /root/.ssh/authorized_keys ; do
-			echo "Waiting for SSH Public Key ..."
-			sleep 5
-		done
-	fi
-else
-	while ! wget -q -O - $PUBKEYURL >/root/.ssh/authorized_keys ; do
-		echo "Waiting for SSH Public Key ..."
-		sleep 5
-	done
-fi
-GETPUBKEY
-
-		chmod 755 /etc/network/if-up.d/0200-getsshpubkeysfromserver
-	fi
-
-}
-
-GetSSHPubKeysFromServer
-
diff --git a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf b/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf
deleted file mode 100755
index 06794b1..0000000
--- a/config/includes.chroot/lib/live/config/2200-xserver-xorg-getxorgconf
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-XServerXorgGetXorgConf ()
-{
-# Output startup message
-#
-echo -n " xserver-xorg-getxorgconf"
-
-        XORGCONFURL=$(cat /proc/cmdline | \
-                       tr ' ' '\n' | \
-                       awk -F'=' ' /^xorgconfurl=/ { print $2 }')
-        if [ -n "$XORGCONFURL" ] && [ -d /etc/X11 ] ; then 
-		XORGCONFDESTINATION=/etc/X11/xorg.conf.new
-	        cat >/etc/network/if-up.d/0300-getxorgconf <<GETXORG
-#!/bin/bash
-export TERM=linux;
-
-while [ -z "\$(hostname -I)" ] ; do
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n)
-	sleep 2
-done
-if echo "$XORGCONFURL" | grep -q "^tftp://" ; then
-	XORGCONFSERVER=$(echo "$XORGCONFURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' )
-	XORGCONFPATH=$(echo "$XORGCONFURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
-	if [ -n "\$XORGCONFSERVER" ] && [ -n "\$XORGCONFPATH" ] ; then
-		while ! atftp \$XORGCONFSERVER -g -r \$XORGCONFPATH -l $XORGCONFDESTINATION ; do
-			echo "Waiting for xorg.conf download ..."
-			sleep 5
-		done
-	fi
-else
-	while ! wget -q -O $XORGCONFDESTINATION $XORGCONFURL ; do
-		echo "Waiting for xorg.conf download ..."
-		sleep 5 
-	done
-fi
-
-if [ -s $XORGCONFDESTINATION ] ; then
-	mv $XORGCONFDESTINATION /etc/X11/xorg.conf
-fi
-GETXORG
-                chmod 755 /etc/network/if-up.d/0300-getxorgconf
-        fi
-}
-XServerXorgGetXorgConf
diff --git a/config/includes.chroot/lib/live/config/2300-live-autoupdate b/config/includes.chroot/lib/live/config/2300-live-autoupdate
deleted file mode 100755
index 7e88812..0000000
--- a/config/includes.chroot/lib/live/config/2300-live-autoupdate
+++ /dev/null
@@ -1,439 +0,0 @@
-#!/bin/sh
-
-cleanup () 
-{ # discard contents of tmpfs, umount if necessary
-	if [ -n "$NTFSROOT" ]; then
-		echo -en "\n$(date +'%F | %T | ')'\$0': Removing '$TEMPDIR/*'."
-		rm -rf $TEMPDIR/*
-	else
-		echo -en "\n$(date +'%F | %T | ')'\$0': Unmounting '$TEMPDIR'."
-		umount $TEMPDIR
-	fi
-	if rmdir $TEMPDIR; then
-		echo -en "\n$(date +'%F | %T | ')'\$0': Removed empty directory '$TEMPDIR'."
-	else
-		echo -en "\n$(date +'%F | %T | ')'\$0': Could not remove directory '$TEMPDIR'."
-	fi
-	if [ -n "$NTFSROOT" ]; then
-		if umount $MOUNTPOINT; then
-			echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'."
-		else
-			echo -en "\n$(date +'%F | %T | ')'\$0': Could not unmount '$MOUNTPOINT'."
-		fi
-	fi
-}
-
-LiveAutoUpdateMain ()
-{
-# Output startup message
-#
-echo -n " live-autoupdater (backgrounding update task)"
-
-
-# Background everything
-#
-(
-
-# redirect all output to first available VT console
-#
-exec >/dev/tty$(fgconsole -n) 2>&1
-
-
-# clear console
-#
-clear
-
-
-# This is so grep, awk and sed will match the right terms regardless of LANG
-#
-unset LANG
-unset LC_ALL
-unset LC_MESSAGES
-
-
-# download url pointing to directory with all required files goes here
-DOWNLOADURL=$(cat /proc/cmdline | \
-               tr ' ' '\n' | \
-               awk -F'=' ' /^updateurl=/ { print $2 }')
-
-if [ -z "$DOWNLOADURL" ]; then
-	echo -en "\n$(date +'%F | %T | ')'\$0': No update URL. Exiting."
-	return 0
-fi
-
-# Bandwidth limit goes here
-#
-#BWLIMITPERCENT=20 # in percent, numeric-only
-BWLIMITPERCENT=$(cat /proc/cmdline | \
-                        tr ' ' '\n' | \
-                        awk -F'=' ' /^bwlimit=/ { print $2 }')
-if [ -z "$BWLIMITPERCENT" ]; then 
-	BWLIMITPERCENT=20
-	echo -en "\n$(date +'%F | %T | ')'\$0': Bandwidth limit not set. Defaulting to 20%."
-fi
-
-
-
-# sleeping a random amount of time to ease load on the update server
-#
-MAXSLEEPTIME=$(cat /proc/cmdline | \
-                        tr ' ' '\n' | \
-                        awk -F'=' ' /^updatesleep=/ && $2 ~ /^[0-9]*$/ { print $2 }')
-if [ -z "$MAXSLEEPTIME" ] || [ $MAXSLEEPTIME -lt 240 ] ; then
-	MAXSLEEPTIME=900
-fi
-SLEEPTIME=0
-echo -en "\n$(date +'%F | %T | ')'\$0': Calculating random update delay (120-$MAXSLEEPTIME seconds)..."
-# During startup, script is run with /bin/sh, 
-# even when #!/bin/bash is set,
-# so we need to improvise.
-RND=$(/bin/bash -c 'echo $RANDOM')
-SLEEPTIME=$((RND%MAXSLEEPTIME))
-if [ $SLEEPTIME -lt 120 ]; then
-	SLEEPTIME=$((SLEEPTIME+120))
-fi
-echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping for $SLEEPTIME seconds ..."
-sleep $SLEEPTIME
-
-
-# Define our mountpoint and check if we're capable of auto-updating
-NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }')
-if [ -n "$NTFSROOT" ]; then
-	mkdir -p /lib/live/mount/ntfsroot
-	# This is in case we've been passed an incomplete UUID and/or one with dashes
-	# For example, "vol c:" on Windows will return the last 8 digits of the UUID
-        # only, and separate them with a dash.
-	if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then
-		NTFSROOT=$(echo $NTFSROOT | tr -d '-')
-		if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then
-			NTFSROOT=$(basename $(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1))
-		fi
-	fi
-
-	if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot ; then
-		echo -en "\n$(date +'%F | %T | ')'\$0': Mounted '/dev/disk/by-uuid/$NTFSROOT'."
-	else
-		echo -en "\n$(date +'%F | %T | ')'\$0': Unable to mount '/dev/disk/by-uuid/$NTFSROOT'."
-	fi
-	# TODO: Further error handling
-	MOUNTPOINT="/lib/live/mount/ntfsroot/"
-	# create a temporary directory
-	TEMPDIR=$(mktemp -d --tmpdir=$MOUNTPOINT)
-else
-	MOUNTPOINT="/lib/live/mount/findiso/"
-	# create a temporary directory and mount a tmpfs there
-	TEMPDIR=$(mktemp -d --tmpdir=/mnt)
-	
-	if [ -d /lib/live/mount/findiso/ ] ; then
-		# if we have access to the entire filesystem, use the
-		# directory size as base size for the current image - 
-		# and if the download directory is even bigger, use that size
-		IMGSIZE=$(du -s "/lib/live/mount/findiso/$(dirname $(sed -e 's/^.*findiso/findiso/' -e 's/ .*$//' /proc/cmdline | awk -F '=' '{ print $2 }'))")
-		IMGSIZEDOWNLOAD=$(du -s "/lib/live/mount/findiso/boot/X2Go-live-download")
-		[ $IMGSIZEDOWNLOAD -gt $IMGSIZE ] && IMGSIZE=$IMGSIZEDOWNLOAD
-	else
-		IMGSIZE=$(df /lib/live/mount/medium | awk ' /medium/ { print $2}')
-	fi
-	# multiply current size by 1.5 as safety margin
-	mount -t tmpfs -osize=$((IMGSIZE*15/10))k tmpfs $TEMPDIR
-
-fi
-if ! (	[ -d "$MOUNTPOINT/boot/X2Go-live-download" ] && \
-	( \
-		[ -d "$MOUNTPOINT/boot/X2Go-live1" ] || \
-		[ -d "$MOUNTPOINT/boot/X2Go-live2" ] \
-	) \
-     ); then
-	[ -n "$NTFSROOT" ] && umount $MOUNTPOINT
-	echo -en "\n$(date +'%F | %T | ')'\$0': No directories suitable for update."
-	return 0 # directories missing, most likely not a writeable medium
-fi
-
-
-# define and figure out some paths that we will be needing later on
-#
-if [ -f "$MOUNTPOINT/syslinux.cfg" ]; then
-	SYSLINUXPATH="$MOUNTPOINT/"
-elif [ -f "$MOUNTPOINT/syslinux/syslinux.cfg" ]; then
-	SYSLINUXPATH="$MOUNTPOINT/syslinux/"
-elif [ -f "$MOUNTPOINT/menu.lst" ]; then
-	GRUBPATH="$MOUNTPOINT/"
-elif  [ -f "$MOUNTPOINT/boot/menu.lst" ]; then
-	GRUBPATH="$MOUNTPOINT/grub/"
-elif  [ -f "$MOUNTPOINT/boot/grub/menu.lst" ]; then
-	GRUBPATH="$MOUNTPOINT/boot/grub/"
-else
-	[ -n "$NTFSROOT" ] && umount $MOUNTPOINT
-	echo -en "\n$(date +'%F | %T | ')'\$0': No suitable bootloader found."
-	return 1
-fi
-
-RUNNINGSYSTEMFULLPATH=$(dirname $(readlink -m "$MOUNTPOINT/$(cat /proc/cmdline | \
-                        tr ' ' '\n' | \
-                        awk -F'=' ' /^findiso=/ { print $2 }')"))
-
-ALLSYSTEMSROOT=$(dirname $RUNNINGSYSTEMFULLPATH)
-RUNNINGSYSTEMNAME=$(basename $RUNNINGSYSTEMFULLPATH)
-if [ "$RUNNINGSYSTEMNAME" = "X2Go-live1" ]; then
-	OTHERSYSTEMNAME="X2Go-live2"
-elif [ "$RUNNINGSYSTEMNAME" = "X2Go-live2" ]; then
-	OTHERSYSTEMNAME="X2Go-live1"
-else
-	[ -n "$NTFSROOT" ] && umount $MOUNTPOINT
-	echo -en "\n$(date +'%F | %T | ')'\$0': Unable to determine path/name of running system."
-	return 1
-fi
-OTHERSYSTEMFULLPATH=$(readlink -m "$ALLSYSTEMSROOT/$OTHERSYSTEMNAME")
-DOWNLOADPATH=$(readlink -m "$ALLSYSTEMSROOT/X2Go-live-download/")
-
-
-# Now we'll copy the content of the X2Go-live-download folder to our tempdir
-# this is so we can run wget in update mode (-N) or rsync without needing
-# write access to our boot medium (write access means increased wear and tear,
-# and we want to avoid that especially for media that has no wear-leveling
-# like CF cards)
-#
-while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $TEMPDIR; do
-	echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..."
-	sleep 30
-	echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..."
-done
-
-
-# Now let's figure out if we're supposed to use wget or rsync for downloading
-#
-if echo "$DOWNLOADURL" | grep -q "^http" || \
-   echo "$DOWNLOADURL" | grep -q "^ftp"
-   then
-	# Attempt to determine available bandwidth & to set BWLIMIT accordingly
-	wget -Nr -o /tmp/dl.log -P /tmp/ -nd \
-		--progress=bar:force $DOWNLOADURL/x2go-tce-initrd.img 
-	cp --update "/tmp/x2go-tce-initrd.img" "$TEMPDIR"
-	rm "/tmp/x2go-tce-initrd.img"
-	SIZEFACTORSTRING=$(	awk -F' |\(|\)' ' $9 == "saved" && \
-				$7 == "-" { print $5 }' /tmp/dl.log | \
-				tail -1 \
-			   )
-	case $SIZEFACTORSTRING in
-		"" | \
-		[0-9]) 	echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - "
-			echo -n "aborting."
-			cleanup
-			return 0
-			;;
-                "KB/s") SIZEFACTOR=1;;
-                "MB/s") SIZEFACTOR=1024;;
-                "GB/s") SIZEFACTOR=1048576;;
-		*)     	SIZEFACTOR=$((1024*1024*1024));;
-	esac
-	DLRATE=$(	awk -F' |\(|\)' ' $9 == "saved" && $7 == "-" \
-			{ print $4 }' /tmp/dl.log | \
-			tail -1
-                 )
-	BWLIMIT=$(	echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \
-			awk ' { print $1*$2*$3/100 }' | \
-			awk -F'.' '{ print $1 }' \
-		  ) # outputs integer kilobytes, not rounded
-	echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'"
-	DOWNLOADCOMMAND="wget -Nr -l 1 -nd -P "$TEMPDIR" \
-			  --progress=bar:force \
-			  --limit-rate=${BWLIMIT}k $DOWNLOADURL"
-
-elif echo "$DOWNLOADURL" | grep -q "^rsync"; then
-
-	rsync -hh -aPv -W --inplace --log-file=/tmp/dl.log $DOWNLOADURL/x2go-tce-initrd.img \
-		$TEMPDIR/x2go-tce-initrd.img.new
-	mv $TEMPDIR/x2go-tce-initrd.img.new $TEMPDIR/x2go-tce-initrd.img
-	SIZEFACTORSTRING=$(	sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \
-				awk '$4 == "sent" && $12 == "bytes/sec" \
-				{ print $11 }' \
-			   )
-	case $SIZEFACTORSTRING in
-		"" | \
-		[0-9]) 	echo -en "\n$(date +'%F | %T | ')'\$0': Not enough Bandwidth for update task - "
-			echo -n "aborting."
-			cleanup
-			return 0
-			;;
-		"K")   	SIZEFACTOR=1;;
-		"M")   	SIZEFACTOR=1024;;
-		"G")   	SIZEFACTOR=$((1024*1024));;
-		*)     	SIZEFACTOR=$((1024*1024*1024));;
-	esac
-	DLRATE=$(	sed -e's_\(. bytes/sec\)_ \1_' /tmp/dl.log | \
-			awk '$4 == "sent" && $12 == "bytes/sec" \
-			{ print $10 }')
-	BWLIMIT=$(	echo "$DLRATE $SIZEFACTOR $BWLIMITPERCENT" | \
-			awk ' { print $1*$2*$3/100 }' | \
-			awk -F'.' '{ print $1 }' \
-		  ) # outputs integer kilobytes, not rounded
-	echo -en "\n$(date +'%F | %T | ')'\$0': Determined bandwidth limit: '$BWLIMIT KB/s'"
-	DOWNLOADCOMMAND="rsync -aPv --inplace --bwlimit=$BWLIMIT $DOWNLOADURL/ \
-			  $TEMPDIR"
-else 
-	[ -n "$NTFSROOT" ] && umount $MOUNTPOINT
-	echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported download mechanism - aborting."
-	return 1
-fi
-rm /tmp/dl.log
-
-
-# Proceed to download from update location
-#
-while ! $DOWNLOADCOMMAND; do
-	echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..."
-	sleep 30
-	echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..."
-done
-
-# Now check if these files are different from what we already have in our
-# download directory on the boot medium
-#
-echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$TEMPDIR' ..."
-if diff -q $DOWNLOADPATH $TEMPDIR \
-	>/dev/null
-
-	then
-	cleanup
-	echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. - Files on server not newer than '$DOWNLOADPATH'."
-	return 0 	# current is newest, nothing to do, we want to avoid
-			# unneccessary writes to the medium
-else
-	echo -en "\n$(date +'%F | %T | ')'\$0': Differences detected. Continuing ..."
-fi
-
-
-# If we made it past that point, it's time to update the boot medium, so let's
-# remount it rw and async for speed
-#
-if mount -oremount,rw,async $MOUNTPOINT; then
-	echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' as rw and async."
-else
-	echo -en "\n$(date +'%F | %T | ')'\$0': Could not remount '$MOUNTPOINT' as rw and async."
-fi
-
-
-# Now, we don't want to copy an index.htm(l) file, so let's do away with that
-#
-rm -f $TEMPDIR/index.ht*
-
-
-# move everything over to the boot medium
-#
-echo -en "\n$(date +'%F | %T | ')'\$0': Moving $TEMPDIR/* => $DOWNLOADPATH"
-mv $TEMPDIR/* $DOWNLOADPATH
-cleanup # FIXME ist dieses Cleanup gerechtfertigt oder macht es dummfoog?
-if [ -n "$NTFSROOT" ]; then
-	echo -en "\n$(date +'%F | %T | ')'\$0': NTFSROOT detected. Attempting to mount '/dev/disk/by-uuid/$NTFSROOT'."
-	if mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot; then
-		echo -en "\n$(date +'%F | %T | ')'\$0': Mount successful."
-	else
-		echo -en "\n$(date +'%F | %T | ')'\$0': Failed to mount NTFSROOT."
-	fi
-fi
-
-
-# let's check if we just downloaded a copy of our running system
-#
-echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$RUNNINGSYSTEMFULLPATH'"
-if diff -q $DOWNLOADPATH $RUNNINGSYSTEMFULLPATH >/dev/null && \
-	   [ -d "$OTHERSYSTEMFULLPATH" ] ; then
-	   [ -n "$NTFSROOT" ] && umount $MOUNTPOINT
-	   echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do. Content of $DOWNLOADPATH equals" \
-		"$RUNNINGSYSTEMNAME."
-		return 0 # current is newest, nothing to do, 
-			 # we want to keep the old system in OTHERSYSTEMFULLPATH
-			 # as a fallback
-fi
-
-
-# make sure our destination path really exists
-#
-mkdir -p $OTHERSYSTEMFULLPATH
-
-
-# let's check if our destination is already up to date or needs updating
-#
-echo -en "\n$(date +'%F | %T | ')'\$0': Diff'ing '$DOWNLOADPATH' '$OTHERSYSTEMFULLPATH'"
-if diff -q $DOWNLOADPATH $OTHERSYSTEMFULLPATH >/dev/null; then
-		[ -n "$NTFSROOT" ] && umount $MOUNTPOINT
-		echo -en "\n$(date +'%F | %T | ')'\$0': Nothing to do - content of '$DOWNLOADPATH' equals"\
-		      "'$OTHERSYSTEMNAME'."
-		return 0 # OTHERSYSTEMFULLPATH is already up to date
-else
-	# keep rsyncing until the update is complete
-	echo -en "\n$(date +'%F | %T | ')'\$0': Copying $DOWNLOADPATH/ => $OTHERSYSTEMFULLPATH"
-	while ! rsync -aPv --inplace --modify-window=1 $DOWNLOADPATH/ $OTHERSYSTEMFULLPATH
-		do
-		echo -en "\n$(date +'%F | %T | ')'\$0': Sleeping 30 seconds ..."
-		sleep 30
-		echo -en "\n$(date +'%F | %T | ')'\$0': Retrying ..."
-	done
-fi
-
-
-# change default boot to the image we just downloaded and installed
-#
-if [ -n "$SYSLINUXPATH" ]; then
-	echo -en "\n$(date +'%F | %T | ')'\$0': Changing syslinux default to $OTHERSYSTEMNAME."
-	sed -i -e"/^default/cdefault $OTHERSYSTEMNAME" \
-		$SYSLINUXPATH/syslinux.cfg
-
-elif [ -n "$GRUBPATH" ]; then
-	MENULST=$GRUBPATH/menu.lst
-	CURRENTDEFAULT=$(awk '/^default/ { print $2 }' $MENULST | tr -d '\r')
-	CURRENTTITLEPOSITION=$(grep '^title' $MENULST | 
-                               grep -n "${RUNNINGSYSTEMNAME}" |
-                               awk -F':' '$2 ~ /'"${RUNNINGSYSTEMNAME}"'/ { print $1 }')
-	CURRENTTITLEPOSITION=$((CURRENTTITLEPOSITION-1))
-	OTHERTITLEPOSITION=$(grep '^title' $MENULST |
-                             grep -n "${OTHERSYSTEMNAME}" |
-                             awk -F':' '$2 ~ /'"${OTHERSYSTEMNAME}"'/ { print $1 }')
-	OTHERTITLEPOSITION=$((OTHERTITLEPOSITION-1))
-	if [ "$CURRENTTITLEPOSITION" = "$CURRENTDEFAULT" ]; then
-		echo -en "\n$(date +'%F | %T | ')'\$0': Changing GRUB-legacy default to $OTHERTITLEPOSITION ..."
-		sed -i -e"/^default/cdefault $OTHERTITLEPOSITION" \
-			$MENULST
-	else
-		echo -en "\n$(date +'%F | %T | ')'\$0': Not changing GRUB-legacy default."
-		echo -en "\n$(date +'%F | %T | ')'\$0': Reason: We're at boot position '$CURRENTTITLEPOSITION',"
-		echo -en "\n$(date +'%F | %T | ')'\$0': while default is set to position '$CURRENTDEFAULT'."
-	fi
-else
-	echo -en "\n$(date +'%F | %T | ')'\$0': Unsupported bootloader."
-fi
-
-# we're on an async mount point, so let's sync to be safe
-#
-sync
-
-
-# umount tempdir to free memory
-#
-if [ -d $TEMPDIR ]; then
-	cleanup
-fi
-
-
-# now, change mount back to ro and sync
-#
-if [ -n "$NTFSROOT" ]; then
-	if umount $MOUNTPOINT; then
-		echo -en "\n$(date +'%F | %T | ')'\$0': Unmounted '$MOUNTPOINT'."
-	else
-		echo -en "\n$(date +'%F | %T | ')'\$0': Unable to unmount '$MOUNTPOINT'."
-	fi
-else	
-	if mount -oremount,ro,sync $MOUNTPOINT; then
-		echo -en "\n$(date +'%F | %T | ')'\$0': Remounted '$MOUNTPOINT' ro and sync."
-	else
-		echo -en "\n$(date +'%F | %T | ')'\$0': Unable to remount '$MOUNTPOINT' ro and sync."
-	fi
-fi
-
-) &
-
-}
-
-LiveAutoUpdateMain
-
diff --git a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions
deleted file mode 100755
index 4e417db..0000000
--- a/config/includes.chroot/lib/live/config/2400-x2go-getportableappsessions
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-X2GoGetPortableAppSessions ()
-{
-
-# Output startup message
-#
-echo -n " x2go-getportableappsessions"
-
-# This script is for using the iso-hybrid image along with the "second partition" patch
-# it allows you to share a configuration between X2GoClient for Windows in portable
-# mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions
-
-if [ -L /dev/disk/by-label/PORTABLEAPP ]; then 
-	mkdir -p /media/PORTABLEAPP && \
-	mount -o sync /dev/disk/by-label/PORTABLEAPP /media/PORTABLEAPP && \
-	ln -sf /media/PORTABLEAPP/x2goclient/sessions /etc/x2go/x2gothinclient_sessions
-else
-	true
-fi
-}
-
-X2GoGetPortableAppSessions
diff --git a/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey b/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey
deleted file mode 100755
index 1f7b486..0000000
--- a/config/includes.chroot/lib/live/config/2410-x2go-getopensshportableclientkey
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-
-X2GoGetOpenSSHPortableClientKey ()
-{
-	# Output startup message
-	#
-	echo -n " x2go-getopensshportableclientkey"
-
-	# This script is for using the iso-hybrid image along with the "second partition" patch
-	# it allows you to share ssh secret keys between X2GoClient for Windows in portable
-	# mode and the X2Go-ThinClientEnvironment on the same USB media using different partitions
-
-	# Homedir of client side X2Go ThinClient Account
-	#
-	X2GOHOME="/home/user/"
-
-	# Homedir of Portable App Installation
-	#
-	HOME="/media/PORTABLEAPP/"
-
-	if [ -d "$HOME" ] && [ -d "$X2GOHOME" ]; then
-
-		# create .ssh-Directory in case it doesn't exist
-		#
-		mkdir -p $(readlink -m "$X2GOHOME/.ssh/")
-
-		for KEYFILE in $HOME/ssh/* ; do
-			[ -s "$KEYFILE" ] || continue
-			KEYDESTPATH="$X2GOHOME/.ssh/$(basename "$KEYFILE")"
-			touch "$KEYDESTPATH"
-			chown   user:user \
-				$KEYDESTPATH
-			chmod   600 $KEYDESTPATH
-			cat     $(readlink -m "$KEYFILE")>$KEYDESTPATH
-
-		done
-
-		# this is so the path name in the sessions file matches again
-		# (cannot use .ssh on FAT, for example)
-		ln -s $X2GOHOME/.ssh $X2GOHOME/ssh
-	fi
-}
-
-X2GoGetOpenSSHPortableClientKey
-
diff --git a/config/includes.chroot/lib/live/config/2500-tcpprint b/config/includes.chroot/lib/live/config/2500-tcpprint
deleted file mode 100755
index 2bb453b..0000000
--- a/config/includes.chroot/lib/live/config/2500-tcpprint
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash
-
-TcpPrint ()
-{
-
-# Output startup message
-#
-echo -n " tcpprint"
-
-if grep -q "\W*tcpprint\W*" /proc/cmdline ; then
-        TCPPRINTONLYFROM=$(cat /proc/cmdline | \
-                       tr ' ' '\n' | \
-                       awk -F'=' ' /^tcpprintonlyfrom=/ { print $2 }')
-	if [ -n "$TCPPRINTONLYFROM" ] ; then
-		TCPPRINTONLYFROM="only_from = $TCPPRINTONLYFROM"
-	fi
-	# Backgrounding
-	(
-
-	while ! lsmod | grep -q "^lp"; do
-		# Wait till modprobe lp has occurred
-		# -> this means /dev is fully populated
-		# => USB-Printers can be detected now, too
-		sleep 30
-	done
-
-	PRINTERDEVICES=""
-	[ -d /dev/usb ] && PRINTERDEVICES=$(find /dev/usb -type c -name "lp*" | sort)
-	PRINTERDEVICES="$PRINTERDEVICES $(find /dev/ -maxdepth 1 -type c -name "lp*" | sort)"
-
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n)
-
-	# Create a listening port for a TCP/9100-RAW-printer
-	#
-	# printers may be at /dev/lp_ and at /dev/usb/lp_
-	PRINTERCOUNT=0
-	for PRINTERDEV in $PRINTERDEVICES; do 
-		PORTNUMBER=$((PRINTERCOUNT+9100))
-		echo "jetdirect${PRINTERCOUNT} ${PORTNUMBER}/tcp" >>/etc/services
-		cat >/etc/xinetd.d/jetdirect${PRINTERCOUNT} << JETDIRCONF 
-service jetdirect${PRINTERCOUNT}
-{
-	socket_type = stream
-	protocol = tcp
-	wait = no
-	user = root
-	server = /bin/dd
-	server_args = of=$PRINTERDEV bs=1024k
-	groups = yes
-	disable = no
-	instances = 1
-	$TCPPRINTONLYFROM
-}
-JETDIRCONF
-		echo -en "\n\$(date +'%F | %T | ')Mapping $PRINTERDEV => $PORTNUMBER" | tee -a /dev/tty\$(fgconsole -n)
-		PRINTERCOUNT=$((PRINTERCOUNT+1))
-	done
-
-	echo "#Local printer config: Done." >/etc/xinetd.d/jetdirect
-
-	if ps -C xinetd --no-header >/dev/null ; then
-		echo -en "\n\$(date +'%F | %T | ')xinetd needs to be restarted, trying to do that ..." | tee -a /dev/tty\$(fgconsole -n)
-		if /etc/init.d/xinetd restart; then
-			echo -n " success. All done." | tee -a /dev/tty\$(fgconsole -n)
-		else
-			echo -n " error." | tee -a /dev/tty\$(fgconsole -n)
-		fi
-	else
-		echo -en "\n\$(date +'%F | %T | ')No xinetd restart necessary. All done." | tee -a /dev/tty\$(fgconsole -n)
-	fi
-
-	) &
-fi
-}
-
-TcpPrint
diff --git a/config/includes.chroot/lib/live/config/2600-x2go-getsessions b/config/includes.chroot/lib/live/config/2600-x2go-getsessions
deleted file mode 100755
index eff3073..0000000
--- a/config/includes.chroot/lib/live/config/2600-x2go-getsessions
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-
-X2GoGetSessions ()
-{
-	# Output startup message
-	#
-	echo -n " x2go-getsessions"
-
-	SESSIONSURL=$(cat /proc/cmdline | \
-		       tr ' ' '\n' | \
-		       awk -F'=' ' /^sessionsurl=/ { print $2 }')
-	if [ -n "$SESSIONSURL" ] && [ -d /etc/x2go ] ; then 
-		# only mv this file if SESSIONSURL was set. If not, leave it in place - as
-                # it might have been customized at image creation time
-        	mv /etc/x2go/x2gothinclient_sessions /etc/x2go/x2gothinclient_sessions_old
-		SESSIONSDESTINATION=/etc/x2go/x2gothinclient_sessions_new
-		cat >/etc/network/if-up.d/0400-getsessions <<GETSESS
-#!/bin/bash
-export TERM=linux;
-
-while [ -z "\$(hostname -I)" ] ; do
-	echo -en "\n\$(date +'%F | %T | ')'\$0' is waiting for a client IP." | tee -a /dev/tty\$(fgconsole -n)
-	sleep 2
-done
-if echo "$SESSIONSURL" | grep -q "^tftp://" ; then
-	SESSIONSSERVER=$(echo "$SESSIONSURL" | sed 's#^tftp://\([^/]*\)/.*$#\1#' )
-	SESSIONSPATH=$(echo "$SESSIONSURL" | sed 's#^tftp://[^/]*/\(.*\)$#\1#' )
-	if [ -n "\$SESSIONSSERVER" ] && [ -n "\$SESSIONSPATH" ] ; then
-		while ! atftp \$SESSIONSSERVER -g -r \$SESSIONSPATH -l $SESSIONSDESTINATION ; do
-			echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(fgconsole -n)
-			sleep 5
-		done
-	fi
-else
-	while ! wget -q -O $SESSIONSDESTINATION $SESSIONSURL ; do
-		echo -en "\n\$(date +'%F | %T | ')Waiting for session config data ..." | tee -a /dev/tty\$(fgconsole -n)
-		sleep 5 
-	done
-fi
-
-if [ -s $SESSIONSDESTINATION ] ; then
-	mv $SESSIONSDESTINATION /etc/x2go/x2gothinclient_sessions
-fi
-GETSESS
-		chmod 755 /etc/network/if-up.d/0400-getsessions
-	fi
-}
-
-X2GoGetSessions

--
Alioth's /srv/git/code.x2go.org/live-build-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git


More information about the x2go-commits mailing list