diff -Nru ltsp-5.3.6/ChangeLog ltsp-5.3.7/ChangeLog --- ltsp-5.3.6/ChangeLog 2012-03-22 19:25:16.000000000 +0000 +++ ltsp-5.3.7/ChangeLog 2012-04-03 18:39:08.000000000 +0000 @@ -1,4 +1,171 @@ ------------------------------------------------------------ +revno: 2169 +tags: ltsp-5.3.7 +committer: Stéphane Graber +branch nick: ltsp-trunk +timestamp: Tue 2012-04-03 14:34:45 -0400 +message: + version 5.3.7 +------------------------------------------------------------ +revno: 2168 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Tue 2012-04-03 11:53:04 +0300 +message: + Check if LOCAL_APPS=True before calling ltsp-genmenu. +------------------------------------------------------------ +revno: 2167 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Tue 2012-04-03 07:18:43 +0300 +message: + udhcp: exit if an LTSP boot was not requested. +------------------------------------------------------------ +revno: 2166 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Tue 2012-04-03 01:22:55 +0300 +message: + Add jockey-kde to RM_SESSION_SERVICES. +------------------------------------------------------------ +revno: 2165 +committer: Wim Muskee +branch nick: ltsp-trunk +timestamp: Sun 2012-04-01 21:05:47 +0200 +message: + Renaming change fixes. +------------------------------------------------------------ +revno: 2164 +committer: Vagrant Cascadian +branch nick: ltsp-trunk +timestamp: Sun 2012-04-01 11:02:30 -0700 +message: + PACKAGING CHANGES: Make ltsp-client-functions and ltsp-server-functions source + only the appropriate client/server vendor functions, to allow different + versions of server and client-side code on the same machine. +------------------------------------------------------------ +revno: 2163 +committer: Vagrant Cascadian +branch nick: ltsp-trunk +timestamp: Sun 2012-04-01 10:49:14 -0700 +message: + rename functions.d to functions, as it doesn't really follow expectations of a + .d style layout. +------------------------------------------------------------ +revno: 2162 +committer: Wim Muskee +branch nick: ltsp-trunk +timestamp: Sun 2012-04-01 17:59:43 +0200 +message: + Gentoo: ltsp-update-kernels cleanup works through functions.d +------------------------------------------------------------ +revno: 2161 +committer: Wim Muskee +branch nick: ltsp-trunk +timestamp: Sun 2012-04-01 08:43:02 +0200 +message: + Gentoo: Fix ltsp-info-functions, thx alkisg, use detect_arch in client lts.conf download. +------------------------------------------------------------ +revno: 2160 +committer: Wim Muskee +branch nick: ltsp-trunk +timestamp: Sat 2012-03-31 21:21:18 +0200 +message: + ltsp-chroot: Apply detect_arch and make it independent of lsb_release. +------------------------------------------------------------ +revno: 2159 +committer: Wim Muskee +branch nick: ltsp-trunk +timestamp: Sat 2012-03-31 21:04:20 +0200 +message: + Finish restructure for vendor functions, added Fedora and Suse detect_arch. Distro's update packaging please. +------------------------------------------------------------ +revno: 2158 +committer: Wim Muskee +branch nick: ltsp-trunk +timestamp: Sat 2012-03-31 17:30:54 +0200 +message: + Implemented detect_arch using ltsp-vendor-functions, packaging needs to include this one. +------------------------------------------------------------ +revno: 2157 +committer: Wim Muskee +branch nick: ltsp-trunk +timestamp: Sat 2012-03-31 15:07:58 +0200 +message: + ltsp-chroot: restructure to use functions.d/. +------------------------------------------------------------ +revno: 2156 +committer: Wim Muskee +branch nick: ltsp-trunk +timestamp: Wed 2012-03-28 19:35:59 +0200 +message: + Gentoo: updating new ltsp-info-functions +------------------------------------------------------------ +revno: 2155 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Wed 2012-03-28 16:10:00 +0300 +message: + Debian: apply XKB* settings to /etc/default/keyboard. +------------------------------------------------------------ +revno: 2154 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Wed 2012-03-28 08:37:26 +0300 +message: + ltsp-info: restructure to use functions.d/. +------------------------------------------------------------ +revno: 2153 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Tue 2012-03-27 20:46:34 +0300 +message: + Rename ltsp-common-functions to ltsp-[server|client]-functions (LP: #950945). Distros: please update packaging. +------------------------------------------------------------ +revno: 2152 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Tue 2012-03-27 19:55:21 +0300 +message: + Remove symlinks from init-ltsp.d. Distros: please update packaging. +------------------------------------------------------------ +revno: 2151 +committer: Stéphane Graber +branch nick: ltsp-trunk +timestamp: Tue 2012-03-27 11:46:56 -0400 +message: + Stop plymouth BEFORE starting start_screen_sessions +------------------------------------------------------------ +revno: 2150 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Mon 2012-03-26 21:29:44 +0300 +message: + Introduce XRANDR_COMMAND_[0-9] (LP: #942608). +------------------------------------------------------------ +revno: 2149 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Mon 2012-03-26 21:28:35 +0300 +message: + Make thin clients default to X_COLOR_DEPTH=16. + + ltsp-discuss thread: http://www.mail-archive.com/ltsp-discuss@lists.sourceforge.net/msg40298.html +------------------------------------------------------------ +revno: 2148 +committer: Alkis Georgopoulos +branch nick: ltsp-trunk +timestamp: Mon 2012-03-26 16:19:52 +0300 +message: + If DNS_SERVER=auto, check if DNS is running on the LTSP server. +------------------------------------------------------------ +revno: 2147 +committer: Wim Muskee +branch nick: ltsp-trunk +timestamp: Sat 2012-03-24 09:12:18 +0100 +message: + Removing ltsp-build-client 010-chroot-tagging. +------------------------------------------------------------ revno: 2146 tags: ltsp-5.3.6 committer: Stéphane Graber @@ -870,7 +1037,6 @@ ltsp_nbd: missed $rootmnt while saving $DEVICE. ------------------------------------------------------------ revno: 2025 -tags: current committer: Alkis Georgopoulos branch nick: ltsp-trunk timestamp: Sun 2012-02-12 13:07:25 +0200 diff -Nru ltsp-5.3.6/client/functions/Debian/ltsp-client-vendor-functions ltsp-5.3.7/client/functions/Debian/ltsp-client-vendor-functions --- ltsp-5.3.6/client/functions/Debian/ltsp-client-vendor-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/client/functions/Debian/ltsp-client-vendor-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,27 @@ +# Debian-specific function overrides for the common functions + +detect_arch() { + if [ -x /usr/bin/dpkg ]; then + echo $(dpkg --print-architecture) + else + echo "i386" + fi +} + +umount_marked() { + [ -z "$MARKED_MOUNTS" ] && return + + echo "$MARKED_MOUNTS" | while read dir; do + # binfmt_misc might need to be unmounted manually, see LP #534211 + if [ "$dir%/proc}" != "$dir" ] && + [ -d "$dir/sys/fs/binfmt_misc" ] && [ -f "$dir/mounts" ] && + grep -q "^binfmt_misc $dir/sys/fs/binfmt_misc" "$dir/mounts"; then + if ! umount "$dir/sys/fs/binfmt_misc"; then + echo "Couldn't unmount $dir/sys/fs/binfmt_misc." >&2 + fi + fi + if ! umount "$dir"; then + echo "Couldn't unmount $dir." >&2 + fi + done +} diff -Nru ltsp-5.3.6/client/functions/Fedora/ltsp-client-vendor-functions ltsp-5.3.7/client/functions/Fedora/ltsp-client-vendor-functions --- ltsp-5.3.6/client/functions/Fedora/ltsp-client-vendor-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/client/functions/Fedora/ltsp-client-vendor-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,5 @@ +# Fedora-specific function overrides for the common functions + +detect_arch() { + echo $(uname -m | sed -e s/i.86/i386/) +} diff -Nru ltsp-5.3.6/client/functions/Gentoo/ltsp-client-vendor-functions ltsp-5.3.7/client/functions/Gentoo/ltsp-client-vendor-functions --- ltsp-5.3.6/client/functions/Gentoo/ltsp-client-vendor-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/client/functions/Gentoo/ltsp-client-vendor-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,5 @@ +# Gentoo-specific function overrides for the common functions + +detect_arch() { + echo $(uname -m | sed -e 's:x86_64:amd64:' -e 's:parisc:hppa:') +} diff -Nru ltsp-5.3.6/client/functions/SUSE_LINUX/ltsp-client-vendor-functions ltsp-5.3.7/client/functions/SUSE_LINUX/ltsp-client-vendor-functions --- ltsp-5.3.6/client/functions/SUSE_LINUX/ltsp-client-vendor-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/client/functions/SUSE_LINUX/ltsp-client-vendor-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,5 @@ +# SUSE_LINUX-specific function overrides for the common functions + +detect_arch() { + echo $(uname -m | sed -e s/i.86/i386/ -e s/ppc.*/powerpc/) +} diff -Nru ltsp-5.3.6/client/init-ltsp ltsp-5.3.7/client/init-ltsp --- ltsp-5.3.6/client/init-ltsp 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp 2012-04-03 18:39:07.000000000 +0000 @@ -1,16 +1,9 @@ #!/bin/sh -. /usr/share/ltsp/ltsp-common-functions +. /usr/share/ltsp/ltsp-client-functions test -f "/etc/ltsp/init-ltsp.conf" && . /etc/ltsp/init-ltsp.conf -VENDOR=${VENDOR:-$(detect_vendor)} -if [ -d "/usr/share/ltsp/init-ltsp.d/$VENDOR" ]; then - scriptsdir="/usr/share/ltsp/init-ltsp.d/$VENDOR" -elif [ -d "/usr/share/ltsp/init-ltsp.d/common" ]; then - scriptsdir="/usr/share/ltsp/init-ltsp.d/common" -else - exit 1 -fi +scriptsdir="/usr/share/ltsp/init-ltsp.d/" # workaround Debian bug in initramfs-tools: # http://bugs.debian.org/660297 diff -Nru ltsp-5.3.6/client/init-ltsp.d/common/10-resolv-conf ltsp-5.3.7/client/init-ltsp.d/common/10-resolv-conf --- ltsp-5.3.6/client/init-ltsp.d/common/10-resolv-conf 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/common/10-resolv-conf 2012-04-03 18:39:07.000000000 +0000 @@ -1,4 +1,11 @@ -# This file is sourced. +# If DNS_SERVER=auto, check if a DNS service is running on the LTSP server. +if [ "$DNS_SERVER" = "auto" ] && [ -n "$SERVER" ]; then + if nc -w 1 -z "$SERVER" 53; then + DNS_SERVER="$SERVER" + else + unset DNS_SERVER + fi +fi # set to defaults from DHCP if not specified in lts.conf if [ -z "$DNS_SERVER" ]; then diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/01-clean-cache ltsp-5.3.7/client/init-ltsp.d/Debian/01-clean-cache --- ltsp-5.3.6/client/init-ltsp.d/Debian/01-clean-cache 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/01-clean-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# Make sure our cache dirs are there -mkdir -p /var/cache/ltsp -mkdir -p /var/cache/ltsp-localapps - -# Also delete the cache files in case they exist in the underlying root rofs. -rm -f /var/cache/ltsp/ltsp_config /var/cache/ltsp/ltsp_config_env diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/02-initramfs-env ltsp-5.3.7/client/init-ltsp.d/Debian/02-initramfs-env --- ltsp-5.3.6/client/init-ltsp.d/Debian/02-initramfs-env 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/02-initramfs-env 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# Source some files saved by the initramfs. -# Those environment variables, e.g. HOSTNAME, can be overriden by lts.conf. - -for netfile in /var/cache/ltsp/net-*.conf ; do - if [ -f "$netfile" ]; then - . "$netfile" - fi -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/03-kernel-cmdline ltsp-5.3.7/client/init-ltsp.d/Debian/03-kernel-cmdline --- ltsp-5.3.6/client/init-ltsp.d/Debian/03-kernel-cmdline 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/03-kernel-cmdline 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -# Get NBD_ROOT_HOST or NFS_SERVER from the kernel command line. - -if [ -n "$NBD_ROOT_HOST" ] || [ -n "$NFS_SERVER" ]; then - return -fi - -for x in $(cat /proc/cmdline); do - case "$x" in - nbdroot=*) - netroot="${x#nbdroot=}" - nbd=true - break - ;; - nfsroot=*) - netroot="${x#nfsroot=}" - nfs=true - break - ;; - esac -done - -# The code below is stripped from local-top/nbd -case "$netroot" in - \[*\]*) - # [ipv6]:port/path - netsrv=${netroot%\]*} - netsrv=${netsrv#\[} - netportpath=${netroot#\[$netsrv\]} - netportpath=${netportpath#:} - netport=${netportpath%%/*} - netpath=${netportpath#$netport} - ;; - *) - # ipv4:port/path - netsrv=${netroot%%[:/]*} - netportpath=${netroot#$netsrv} - netportpath=${netportpath#:} - netport=${netportpath%%/*} - netpath=${netportpath#$netport} - ;; -esac - -# If not specified in the kernel cmdline, use the value from DHCP -netsrv=${netsrv:-$ROOTSERVER} - -if [ -n "$nbd" ]; then - export NBD_ROOT_HOST="$netsrv" - echo "NBD_ROOT_HOST=$NBD_ROOT_HOST" - case "$netport" in - *[!0-9]*) - # non-numeric characters, assume a name rather than a port - netpath="$netport" - unset netport - ;; - esac - if [ -n "$netpath" ]; then - export NBD_ROOT_NAME="$netpath" - echo "NBD_ROOT_NAME=$NBD_ROOT_NAME" - fi - if [ -n "$netport" ]; then - export NBD_ROOT_PORT="$netport" - echo "NBD_ROOT_PORT=$NBD_ROOT_PORT" - fi -elif [ -n "$nfs" ]; then - export NFS_SERVER="$netsrv" - echo "NFS_SERVER=$NFS_SERVER" -fi >> /var/cache/ltsp/ltsp_config diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/04-server ltsp-5.3.7/client/init-ltsp.d/Debian/04-server --- ltsp-5.3.6/client/init-ltsp.d/Debian/04-server 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/04-server 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -# Ensure a default for SERVER. It may be overriden later on by lts.conf. -if [ -n "$NBD_ROOT_HOST" ]; then - export SERVER="$NBD_ROOT_HOST" -elif [ -n "$NFS_SERVER" ]; then - export SERVER="$NFS_SERVER" -else - test -f /proc/mounts && while read MOUNTED_DEVICE MOUNTPOINT FSTYPE OPTIONS PASS1 PASS2; do - case $MOUNTED_DEVICE in - /dev/nbd[0-9]*) - if [ "$MOUNTPOINT" = "/rofs" ] || [ "$MOUNTPOINT" = "/" ]; then - # check for NBD devices - pid=$(nbd-client -c $MOUNTED_DEVICE) - - if grep -q '\-N' /proc/$pid/cmdline; then - server=$(cut -d '' -f 2 /proc/$pid/cmdline) - name=$(cut -d '' -f 5 /proc/$pid/cmdline) - else - server=$(cut -d '' -f 2 /proc/$pid/cmdline) - port=$(cut -d '' -f 3 /proc/$pid/cmdline) - fi - - # Check for nbd-proxy - if [ "$server" = "127.0.0.1" ]; then - server=$(ps --no-headers -o cmd x | grep "^nbd-proxy [[:graph:]]* [[:graph:]]* ${port}" | cut -d ' ' -f2) - fi - fi - echo "NBD_ROOT_HOST=${server}" >> /var/cache/ltsp/ltsp_config - if [ -n "$name" ]; then - echo "NBD_ROOT_NAME=${name}" >> /var/cache/ltsp/ltsp_config - else - echo "NBD_ROOT_PORT=${port}" >> /var/cache/ltsp/ltsp_config - fi - ;; - *) - if [ "$FSTYPE" = "nfs" ]; then - if [ "$MOUNTPOINT" = "/" ] || [ "$MOUNTPOINT" = "/rofs" ]; then - # NFS root - server=${MOUNTED_DEVICE%%:*} - echo NFS_SERVER=${server} >> /var/cache/ltsp/ltsp_config - fi - fi - ;; - esac - [ -n "$server" ] && break - done < /proc/mounts - - SERVER="${server:-$ROOTSERVER}" - export SERVER="${SERVER:-192.168.0.1}" -fi -echo "SERVER=$SERVER" >> /var/cache/ltsp/ltsp_config diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/05-getltsconffile ltsp-5.3.7/client/init-ltsp.d/Debian/05-getltsconffile --- ltsp-5.3.6/client/init-ltsp.d/Debian/05-getltsconffile 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/05-getltsconffile 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# get the lts.conf via tftp - -# $filename comes from net-eth0.conf and is usually "//pxelinux.0". -# If it contains a path, we want to construct "//lts.conf". -# If it doesn't, we want just "lts.conf" without inserting a slash, as some tftp -# servers have problems with it. Finally, if $filename isn't set, we want to -# default to "/ltsp/i386/lts.conf". -if [ -n "$SERVER" ]; then - fileonly=${filename##*/} - pathonly=${filename%$fileonly} - lts_conf_temp=$(mktemp) - tftp "$SERVER" -c get ${pathonly:-/ltsp/i386/}lts.conf $lts_conf_temp >/dev/null - # only overwrite lts.conf if it has non-zero size. - if [ -s "$lts_conf_temp" ]; then - mv "$lts_conf_temp" /etc/lts.conf - else - rm "$lts_conf_temp" - fi -fi - -# Get the lts.conf vars into the environment -. /usr/share/ltsp/ltsp_config diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/06-ltsp-init-common ltsp-5.3.7/client/init-ltsp.d/Debian/06-ltsp-init-common --- ltsp-5.3.6/client/init-ltsp.d/Debian/06-ltsp-init-common 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/06-ltsp-init-common 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# This file is sourced - -. /usr/share/ltsp/ltsp-init-common diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/09-hostname ltsp-5.3.7/client/init-ltsp.d/Debian/09-hostname --- ltsp-5.3.6/client/init-ltsp.d/Debian/09-hostname 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/09-hostname 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -if [ -z "$HOSTNAME" ]; then - HOSTNAME_BASE=${HOSTNAME_BASE:-ltsp} - case "$HOSTNAME_EXTRA" in - mac) - HOSTNAME_EXTRA=$(ip link show $DEVICE | awk '/ether/{print $2}' | tr ':' '-') - ;; - ip|"") - HOSTNAME_EXTRA=$(echo "$IPV4ADDR.$IPV4NETMASK" | awk -F "." '{ print (($1%(256-$5)*256+$2%(256-$6))*256+$3%(256-$7))*256+$4%(256-$8) }') - ;; - esac - HOSTNAME="$HOSTNAME_BASE$HOSTNAME_EXTRA" -fi - -hostname "$HOSTNAME" -echo "$HOSTNAME" > /etc/hostname - -cat < /etc/hosts -127.0.0.1 localhost -127.0.0.2 $HOSTNAME -$SERVER server - -# The following lines are desirable for IPv6 capable hosts -::1 ip6-localhost ip6-loopback -fe00::0 ip6-localnet -ff00::0 ip6-mcastprefix -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters -EOF - -if [ -f /etc/hosts.ltsp ]; then - cat /etc/hosts.ltsp >> /etc/hosts -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/10-resolv-conf ltsp-5.3.7/client/init-ltsp.d/Debian/10-resolv-conf --- ltsp-5.3.6/client/init-ltsp.d/Debian/10-resolv-conf 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/10-resolv-conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -# This file is sourced. - -# set to defaults from DHCP if not specified in lts.conf -if [ -z "$DNS_SERVER" ]; then - for dns in $IPV4DNS0 $IPV4DNS1 ; do - # ignore nameserver of 0.0.0.0, which ipconfig may return if both - # nameservers aren't specified. - if [ "$dns" != "0.0.0.0" ]; then - DNS_SERVER="$DNS_SERVER $dns" - fi - done -fi - -if [ -z "$SEARCH_DOMAIN" ] && [ -n "$DNSDOMAIN" ]; then - SEARCH_DOMAIN="$DNSDOMAIN" -fi - -# Apply the dns info that was received from dhcp or from lts.conf -if [ -n "$DNS_SERVER" ] || [ -n "$SEARCH_DOMAIN" ]; then - # Deal with resolvconf - if [ -x /sbin/resolvconf ] && ( [ -L /etc/resolv.conf ] || [ -e /var/lib/resolvconf/convert ] ); then - mkdir -p /run/resolvconf/interface/ - resolv_method=resolvconf - resolv=/run/resolvconf/interface/LTSP - else - resolv_method=static - resolv=/etc/resolv.conf - fi - - # Check if $resolv is writable - if echo '# Generated by ltsp' 2>/dev/null > "$resolv"; then - if [ -n "$SEARCH_DOMAIN" ]; then - echo "search $SEARCH_DOMAIN" >> "$resolv" - fi - for n in $DNS_SERVER; do - echo "nameserver $n" >> "$resolv" - done - fi -fi -true diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/20-modules ltsp-5.3.7/client/init-ltsp.d/Debian/20-modules --- ltsp-5.3.6/client/init-ltsp.d/Debian/20-modules 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/20-modules 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# Load extra modules here, in case they affect other plugins -for module in $(env|grep ^MODULE_|sed -e s/^MODULE_[0-9]*\=//|sed -e s/\ /*/g);do - modprobe $(echo $module|tr "*" " ") -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-cron ltsp-5.3.7/client/init-ltsp.d/Debian/50-cron --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-cron 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-cron 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -CRON_FILE=/etc/cron.d/ltsp -if [ ! -w "/etc/cron.d" ]; then - echo "Warning: /etc/cron.d is not writeable." - return 1 -fi -if [ -n "$SHUTDOWN_TIME" ] ; then - echo $SHUTDOWN_TIME | awk -F : '{print $2" "$1" * * * root test ! -S \"$(ls -1 /var/run/ldm_socket_* | head -1)\" && PATH=\$PATH:/sbin/ poweroff" }' >> $CRON_FILE -fi -env | sed -n 's/^CRONTAB_[0-9][0-9]=//p' >> $CRON_FILE diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-fstab ltsp-5.3.7/client/init-ltsp.d/Debian/50-fstab --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-fstab 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-fstab 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -if [ -n "$CONFIGURE_FSTAB" ] && ! boolean_is_true "$CONFIGURE_FSTAB"; then - return -fi - -cat >/etc/fstab < -proc /proc proc nodev,noexec,nosuid 0 0 -EOF - -# Backwards compatibility for the deprecated NFS_HOME lts.conf option -if [ -n "$NFS_HOME" ]; then - # if $NFS_HOME doesn't contain a :/ part - if [ "$NFS_HOME" = ${NFS_HOME#*:} ]; then - # Ensure that it begins with a slash, and also add the server - NFS_HOME="/${NFS_HOME#/}" - NFS_HOME="$SERVER:$NFS_HOME" - fi - mntpt=${NFS_HOME##*:} - test -n "$mntpt" && mkdir -p "$mntpt" - NFS_HOME_OPTIONS=${NFS_HOME_OPTIONS:-defaults} - echo "$NFS_HOME $mntpt nfs $NFS_HOME_OPTIONS 0 0" >> /etc/fstab -fi - -# Put FSTAB_0 to FSTAB_9 lts.conf options to fstab -env | sed -n '/^FSTAB_[0-9]=/s///p' >> /etc/fstab diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-interfaces ltsp-5.3.7/client/init-ltsp.d/Debian/50-interfaces --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-interfaces 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-interfaces 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -# This file is sourced - -# prohibit network-manager from messing with the boot interface -if [ -w "/etc/network/interfaces" ]; then - if [ -n "$DEVICE" ]; then - echo "" - echo "auto $DEVICE" - echo "iface $DEVICE inet manual" - fi >> "/etc/network/interfaces" 2>/dev/null || true -fi - diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-jetpipe ltsp-5.3.7/client/init-ltsp.d/Debian/50-jetpipe --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-jetpipe 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-jetpipe 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -for I in 0 1 2; do - eval PRINTER_DEVICE=\$\{PRINTER_${I}_DEVICE\} - if [ -n "${PRINTER_DEVICE}" ]; then - eval PORT=\$\{PRINTER_${I}_PORT:="910${I}"\} - eval BAUD=\$\{PRINTER_${I}_SPEED:-"9600"\} - eval SIZE=\$\{PRINTER_${I}_DATABITS:-"8"\} - eval PARITY=\$\{PRINTER_${I}_PARITY:-"none"\} - eval FLOW=\$\{PRINTER_${I}_FLOWCTRL:-"soft"\} - - JETPIPE_ARGS= - [ -n "$BAUD" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -b ${BAUD}" - [ -n "$SIZE" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -y ${SIZE}" - [ -n "$PARITY" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -p ${PARITY}" - if [ -n "$FLOW" ]; then - if [ "$FLOW" = "soft" ]; then - JETPIPE_ARGS="${JETPIPE_ARGS} -x" - else - JETPIPE_ARGS="${JETPIPE_ARGS} -r" - fi - fi - - /usr/sbin/jetpipe ${JETPIPE_ARGS} ${PRINTER_DEVICE} ${PORT} - fi -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-keyboard ltsp-5.3.7/client/init-ltsp.d/Debian/50-keyboard --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-keyboard 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-keyboard 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,8 @@ +for file in /etc/default/console-setup /etc/default/keyboard; do + test -f "$file" || continue + + test -n "$XKBMODEL" && sed -i "s/XKBMODEL=.*/XKBMODEL=\"$XKBMODEL\"/" "$file" + test -n "$XKBLAYOUT" && sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"$XKBLAYOUT\"/" "$file" + test -n "$XKBVARIANT" && sed -i "s/XKBVARIANT=.*/XKBVARIANT=\"$XKBVARIANT\"/" "$file" + test -n "$XKBOPTIONS" && sed -i "s/XKBOPTIONS=.*/XKBOPTIONS=\"$XKBOPTIONS\"/" "$file" +done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-rcfiles ltsp-5.3.7/client/init-ltsp.d/Debian/50-rcfiles --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-rcfiles 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-rcfiles 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# Sample rc.local may end with "exit 0", remove it if it's in the last line -sed '${/^exit 0$/d;}' -i /etc/rc.local - -env | sed -n 's/^RCFILE_[0-9][0-9]=//p' >> /etc/rc.local diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-rm-session-services ltsp-5.3.7/client/init-ltsp.d/Debian/50-rm-session-services --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-rm-session-services 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-rm-session-services 2012-04-03 18:39:07.000000000 +0000 @@ -5,7 +5,7 @@ # For readability, include the comment line from service.desktop. # Notify about new hardware drivers available for the system -RM_SESSION_SERVICES="$RM_SESSION_SERVICES jockey-gtk" +RM_SESSION_SERVICES="$RM_SESSION_SERVICES jockey-gtk jockey-kde" # Check for available updates automatically RM_SESSION_SERVICES="$RM_SESSION_SERVICES update-notifier" diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-saned ltsp-5.3.7/client/init-ltsp.d/Debian/50-saned --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-saned 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-saned 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -if boolean_is_true "$SCANNER" ; then - saned -a -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-sendsigs ltsp-5.3.7/client/init-ltsp.d/Debian/50-sendsigs --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-sendsigs 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-sendsigs 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -if [ -n "$NBD_ROOT_HOST" ]; then - # register pids of nbd-client and nbd-proxy so that sendsigs doesn't kill - # them on shutdown/reboot. - - # FIXME: only register pids relevent to the root filesystem. - nbd_pids=$(pgrep '^nbd-client|^nbd-proxy') - for d in /run/sendsigs.omit.d /lib/init/rw/sendsigs.omit.d /var/run/sendsigs.omit.d ; do - if [ -d "$d" ]; then - for p in $nbd_pids ; do - echo "$p" >> "$d"/ltsp || true - done - fi - done -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-set-time ltsp-5.3.7/client/init-ltsp.d/Debian/50-set-time --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-set-time 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-set-time 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# Set up timezone -if [ -n "$TIMEZONE" ] && [ -e "/usr/share/zoneinfo/$TIMEZONE" ]; then - cp /usr/share/zoneinfo/$TIMEZONE /etc/localtime 2>/dev/null -fi - -# Set timeserver to $SERVER if set to autodetect -if [ "$TIMESERVER" = "auto" ]; then - TIMESERVER=${SERVER} -fi - -# Set up timeserver -if [ -n "$TIMESERVER" ]; then - ntpdate $TIMESERVER && hwclock --systohc --${HWCLOCK:-"utc"} --noadjfile || true -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-swap ltsp-5.3.7/client/init-ltsp.d/Debian/50-swap --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-swap 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-swap 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -if boolean_is_true "$USE_LOCAL_SWAP" ; then - # Enable local swap partition if found on local disk - for part in `sfdisk -l 2>/dev/null | awk '/ 82 / { print $1}'`; do - swap_devices="$swap_devices $part" - done -fi - -# Set NBD_SWAP=true by default for clients with RAM < NBD_SWAP_THRESHOLD -if [ -z "$NBD_SWAP" ]; then - # Set reasonable defaults for NBD_SWAP_THRESHOLD (in MB) - if [ -z "$NBD_SWAP_THRESHOLD" ]; then - if boolean_is_true "$LTSP_FATCLIENT"; then - NBD_SWAP_THRESHOLD=800 - else - NBD_SWAP_THRESHOLD=300 - fi - fi - memtotal=$(sed -n 's/MemTotal: *\([0-9]*\) .*/\1/p' /proc/meminfo) - if [ "$memtotal" -lt $((1024*$NBD_SWAP_THRESHOLD)) ]; then - NBD_SWAP=true - fi -fi - -if boolean_is_true "$NBD_SWAP" ; then - NBD_SWAP_HOST=${NBD_SWAP_HOST:-"$SERVER"} - modprobe nbd - # Detect first unused nbd device, skip nbd0 - for num in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do - nbd-client -c /dev/nbd${num} > /dev/null - [ $? -eq 1 ] && break - done - # TODO: add -persist here when LP: #938511 is solved, but also verify that - # we'll get the same file from the server without `mkswap` called again. - nbd-client $NBD_SWAP_HOST -N swap /dev/nbd${num} -swap && \ - swap_devices="$swap_devices /dev/nbd${num}" -fi - -if boolean_is_true "$ENCRYPT_SWAP" ; then - if [ -x /sbin/cryptsetup ]; then - modprobe dm_crypt - else - echo "ERROR: ENCRYPT_SWAP=Y, but /sbin/cryptsetup not found. disabling swap." - swap_devices="" - fi -fi - -num=0 -for device in $swap_devices ; do - swap="$device" - if boolean_is_true "$ENCRYPT_SWAP" ; then - if [ -x /sbin/cryptsetup ]; then - cryptsetup -d /dev/urandom create swap$num $swap && swap="/dev/mapper/swap$num" - num=$(($num+1)) - fi - mkswap $swap - fi - swapon $swap -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Debian/50-syslog ltsp-5.3.7/client/init-ltsp.d/Debian/50-syslog --- ltsp-5.3.6/client/init-ltsp.d/Debian/50-syslog 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Debian/50-syslog 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -if [ -z "$SYSLOG" ] || [ "$SYSLOG" = "remote" ]; then - syslog_conf=/etc/syslog.conf - if [ -d /etc/rsyslog.d ]; then - syslog_conf=/etc/rsyslog.d/ltsp.conf - touch $syslog_conf - fi - if [ -f "$syslog_conf" ]; then - cat < "$syslog_conf" -*.* @${SYSLOG_HOST:-$SERVER} -EOF - fi -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/01-clean-cache ltsp-5.3.7/client/init-ltsp.d/Gentoo/01-clean-cache --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/01-clean-cache 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/01-clean-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# Make sure our cache dirs are there -mkdir -p /var/cache/ltsp -mkdir -p /var/cache/ltsp-localapps - -# Also delete the cache files in case they exist in the underlying root rofs. -rm -f /var/cache/ltsp/ltsp_config /var/cache/ltsp/ltsp_config_env diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/02-initramfs-env ltsp-5.3.7/client/init-ltsp.d/Gentoo/02-initramfs-env --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/02-initramfs-env 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/02-initramfs-env 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# Source some files saved by the initramfs. -# Those environment variables, e.g. HOSTNAME, can be overriden by lts.conf. - -for netfile in /var/cache/ltsp/net-*.conf ; do - if [ -f "$netfile" ]; then - . "$netfile" - fi -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/03-kernel-cmdline ltsp-5.3.7/client/init-ltsp.d/Gentoo/03-kernel-cmdline --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/03-kernel-cmdline 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/03-kernel-cmdline 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -# Get NBD_ROOT_HOST or NFS_SERVER from the kernel command line. - -if [ -n "$NBD_ROOT_HOST" ] || [ -n "$NFS_SERVER" ]; then - return -fi - -for x in $(cat /proc/cmdline); do - case "$x" in - nbdroot=*) - netroot="${x#nbdroot=}" - nbd=true - break - ;; - nfsroot=*) - netroot="${x#nfsroot=}" - nfs=true - break - ;; - esac -done - -# The code below is stripped from local-top/nbd -case "$netroot" in - \[*\]*) - # [ipv6]:port/path - netsrv=${netroot%\]*} - netsrv=${netsrv#\[} - netportpath=${netroot#\[$netsrv\]} - netportpath=${netportpath#:} - netport=${netportpath%%/*} - netpath=${netportpath#$netport} - ;; - *) - # ipv4:port/path - netsrv=${netroot%%[:/]*} - netportpath=${netroot#$netsrv} - netportpath=${netportpath#:} - netport=${netportpath%%/*} - netpath=${netportpath#$netport} - ;; -esac - -# If not specified in the kernel cmdline, use the value from DHCP -netsrv=${netsrv:-$ROOTSERVER} - -if [ -n "$nbd" ]; then - export NBD_ROOT_HOST="$netsrv" - echo "NBD_ROOT_HOST=$NBD_ROOT_HOST" - case "$netport" in - *[!0-9]*) - # non-numeric characters, assume a name rather than a port - netpath="$netport" - unset netport - ;; - esac - if [ -n "$netpath" ]; then - export NBD_ROOT_NAME="$netpath" - echo "NBD_ROOT_NAME=$NBD_ROOT_NAME" - fi - if [ -n "$netport" ]; then - export NBD_ROOT_PORT="$netport" - echo "NBD_ROOT_PORT=$NBD_ROOT_PORT" - fi -elif [ -n "$nfs" ]; then - export NFS_SERVER="$netsrv" - echo "NFS_SERVER=$NFS_SERVER" -fi >> /var/cache/ltsp/ltsp_config diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/04-server ltsp-5.3.7/client/init-ltsp.d/Gentoo/04-server --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/04-server 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/04-server 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -# Ensure a default for SERVER. It may be overriden later on by lts.conf. -if [ -n "$NBD_ROOT_HOST" ]; then - export SERVER="$NBD_ROOT_HOST" -elif [ -n "$NFS_SERVER" ]; then - export SERVER="$NFS_SERVER" -else - test -f /proc/mounts && while read MOUNTED_DEVICE MOUNTPOINT FSTYPE OPTIONS PASS1 PASS2; do - case $MOUNTED_DEVICE in - /dev/nbd[0-9]*) - if [ "$MOUNTPOINT" = "/rofs" ] || [ "$MOUNTPOINT" = "/" ]; then - # check for NBD devices - pid=$(nbd-client -c $MOUNTED_DEVICE) - - if grep -q '\-N' /proc/$pid/cmdline; then - server=$(cut -d '' -f 2 /proc/$pid/cmdline) - name=$(cut -d '' -f 5 /proc/$pid/cmdline) - else - server=$(cut -d '' -f 2 /proc/$pid/cmdline) - port=$(cut -d '' -f 3 /proc/$pid/cmdline) - fi - - # Check for nbd-proxy - if [ "$server" = "127.0.0.1" ]; then - server=$(ps --no-headers -o cmd x | grep "^nbd-proxy [[:graph:]]* [[:graph:]]* ${port}" | cut -d ' ' -f2) - fi - fi - echo "NBD_ROOT_HOST=${server}" >> /var/cache/ltsp/ltsp_config - if [ -n "$name" ]; then - echo "NBD_ROOT_NAME=${name}" >> /var/cache/ltsp/ltsp_config - else - echo "NBD_ROOT_PORT=${port}" >> /var/cache/ltsp/ltsp_config - fi - ;; - *) - if [ "$FSTYPE" = "nfs" ]; then - if [ "$MOUNTPOINT" = "/" ] || [ "$MOUNTPOINT" = "/rofs" ]; then - # NFS root - server=${MOUNTED_DEVICE%%:*} - echo NFS_SERVER=${server} >> /var/cache/ltsp/ltsp_config - fi - fi - ;; - esac - [ -n "$server" ] && break - done < /proc/mounts - - SERVER="${server:-$ROOTSERVER}" - export SERVER="${SERVER:-192.168.0.1}" -fi -echo "SERVER=$SERVER" >> /var/cache/ltsp/ltsp_config diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/05-getltsconffile ltsp-5.3.7/client/init-ltsp.d/Gentoo/05-getltsconffile --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/05-getltsconffile 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/05-getltsconffile 2012-04-03 18:39:07.000000000 +0000 @@ -1,13 +1,13 @@ # Attempt to get lts.conf via tftp -arch=$(uname -m | sed -e 's:x86_64:amd64:' -e 's:parisc:hppa:') +arch=$(detect_arch) tftppath="/ltsp/${arch}/lts.conf" lts_conf_temp=$(mktemp) tftp "$SERVER" -c get ${tftppath} $lts_conf_temp >/dev/null # or if tftp gives a buffer overflow error, use curl -# https://bugs.archlinux.org/task/28103 +# https://bugs.gentoo.org/show_bug.cgi?id=357083 # curl "tftp://${SERVER}${tftppath}" -o $lts_conf_temp >/dev/null # only overwrite lts.conf if it has non-zero size. diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/06-ltsp-init-common ltsp-5.3.7/client/init-ltsp.d/Gentoo/06-ltsp-init-common --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/06-ltsp-init-common 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/06-ltsp-init-common 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# This file is sourced - -. /usr/share/ltsp/ltsp-init-common diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/10-resolv-conf ltsp-5.3.7/client/init-ltsp.d/Gentoo/10-resolv-conf --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/10-resolv-conf 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/10-resolv-conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -# This file is sourced. - -# set to defaults from DHCP if not specified in lts.conf -if [ -z "$DNS_SERVER" ]; then - for dns in $IPV4DNS0 $IPV4DNS1 ; do - # ignore nameserver of 0.0.0.0, which ipconfig may return if both - # nameservers aren't specified. - if [ "$dns" != "0.0.0.0" ]; then - DNS_SERVER="$DNS_SERVER $dns" - fi - done -fi - -if [ -z "$SEARCH_DOMAIN" ] && [ -n "$DNSDOMAIN" ]; then - SEARCH_DOMAIN="$DNSDOMAIN" -fi - -# Apply the dns info that was received from dhcp or from lts.conf -if [ -n "$DNS_SERVER" ] || [ -n "$SEARCH_DOMAIN" ]; then - # Deal with resolvconf - if [ -x /sbin/resolvconf ] && ( [ -L /etc/resolv.conf ] || [ -e /var/lib/resolvconf/convert ] ); then - mkdir -p /run/resolvconf/interface/ - resolv_method=resolvconf - resolv=/run/resolvconf/interface/LTSP - else - resolv_method=static - resolv=/etc/resolv.conf - fi - - # Check if $resolv is writable - if echo '# Generated by ltsp' 2>/dev/null > "$resolv"; then - if [ -n "$SEARCH_DOMAIN" ]; then - echo "search $SEARCH_DOMAIN" >> "$resolv" - fi - for n in $DNS_SERVER; do - echo "nameserver $n" >> "$resolv" - done - fi -fi -true diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/20-modules ltsp-5.3.7/client/init-ltsp.d/Gentoo/20-modules --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/20-modules 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/20-modules 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# Load extra modules here, in case they affect other plugins -for module in $(env|grep ^MODULE_|sed -e s/^MODULE_[0-9]*\=//|sed -e s/\ /*/g);do - modprobe $(echo $module|tr "*" " ") -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-cron ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-cron --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-cron 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-cron 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -CRON_FILE=/etc/cron.d/ltsp -if [ ! -w "/etc/cron.d" ]; then - echo "Warning: /etc/cron.d is not writeable." - return 1 -fi -if [ -n "$SHUTDOWN_TIME" ] ; then - echo $SHUTDOWN_TIME | awk -F : '{print $2" "$1" * * * root test ! -S \"$(ls -1 /var/run/ldm_socket_* | head -1)\" && PATH=\$PATH:/sbin/ poweroff" }' >> $CRON_FILE -fi -env | sed -n 's/^CRONTAB_[0-9][0-9]=//p' >> $CRON_FILE diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-fstab ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-fstab --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-fstab 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-fstab 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -if [ -n "$CONFIGURE_FSTAB" ] && ! boolean_is_true "$CONFIGURE_FSTAB"; then - return -fi - -cat >/etc/fstab < -proc /proc proc nodev,noexec,nosuid 0 0 -EOF - -# Backwards compatibility for the deprecated NFS_HOME lts.conf option -if [ -n "$NFS_HOME" ]; then - # if $NFS_HOME doesn't contain a :/ part - if [ "$NFS_HOME" = ${NFS_HOME#*:} ]; then - # Ensure that it begins with a slash, and also add the server - NFS_HOME="/${NFS_HOME#/}" - NFS_HOME="$SERVER:$NFS_HOME" - fi - mntpt=${NFS_HOME##*:} - test -n "$mntpt" && mkdir -p "$mntpt" - NFS_HOME_OPTIONS=${NFS_HOME_OPTIONS:-defaults} - echo "$NFS_HOME $mntpt nfs $NFS_HOME_OPTIONS 0 0" >> /etc/fstab -fi - -# Put FSTAB_0 to FSTAB_9 lts.conf options to fstab -env | sed -n '/^FSTAB_[0-9]=/s///p' >> /etc/fstab diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-interfaces ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-interfaces --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-interfaces 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-interfaces 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -# This file is sourced - -# prohibit network-manager from messing with the boot interface -if [ -w "/etc/network/interfaces" ]; then - if [ -n "$DEVICE" ]; then - echo "" - echo "auto $DEVICE" - echo "iface $DEVICE inet manual" - fi >> "/etc/network/interfaces" 2>/dev/null || true -fi - diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-jetpipe ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-jetpipe --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-jetpipe 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-jetpipe 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -for I in 0 1 2; do - eval PRINTER_DEVICE=\$\{PRINTER_${I}_DEVICE\} - if [ -n "${PRINTER_DEVICE}" ]; then - eval PORT=\$\{PRINTER_${I}_PORT:="910${I}"\} - eval BAUD=\$\{PRINTER_${I}_SPEED:-"9600"\} - eval SIZE=\$\{PRINTER_${I}_DATABITS:-"8"\} - eval PARITY=\$\{PRINTER_${I}_PARITY:-"none"\} - eval FLOW=\$\{PRINTER_${I}_FLOWCTRL:-"soft"\} - - JETPIPE_ARGS= - [ -n "$BAUD" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -b ${BAUD}" - [ -n "$SIZE" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -y ${SIZE}" - [ -n "$PARITY" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -p ${PARITY}" - if [ -n "$FLOW" ]; then - if [ "$FLOW" = "soft" ]; then - JETPIPE_ARGS="${JETPIPE_ARGS} -x" - else - JETPIPE_ARGS="${JETPIPE_ARGS} -r" - fi - fi - - /usr/sbin/jetpipe ${JETPIPE_ARGS} ${PRINTER_DEVICE} ${PORT} - fi -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-saned ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-saned --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-saned 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-saned 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -if boolean_is_true "$SCANNER" ; then - saned -a -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-sendsigs ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-sendsigs --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-sendsigs 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-sendsigs 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -if [ -n "$NBD_ROOT_HOST" ]; then - # register pids of nbd-client and nbd-proxy so that sendsigs doesn't kill - # them on shutdown/reboot. - - # FIXME: only register pids relevent to the root filesystem. - nbd_pids=$(pgrep '^nbd-client|^nbd-proxy') - for d in /run/sendsigs.omit.d /lib/init/rw/sendsigs.omit.d /var/run/sendsigs.omit.d ; do - if [ -d "$d" ]; then - for p in $nbd_pids ; do - echo "$p" >> "$d"/ltsp || true - done - fi - done -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-set-time ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-set-time --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-set-time 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-set-time 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# Set up timezone -if [ -n "$TIMEZONE" ] && [ -e "/usr/share/zoneinfo/$TIMEZONE" ]; then - cp /usr/share/zoneinfo/$TIMEZONE /etc/localtime 2>/dev/null -fi - -# Set timeserver to $SERVER if set to autodetect -if [ "$TIMESERVER" = "auto" ]; then - TIMESERVER=${SERVER} -fi - -# Set up timeserver -if [ -n "$TIMESERVER" ]; then - ntpdate $TIMESERVER && hwclock --systohc --${HWCLOCK:-"utc"} --noadjfile || true -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-swap ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-swap --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-swap 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-swap 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -if boolean_is_true "$USE_LOCAL_SWAP" ; then - # Enable local swap partition if found on local disk - for part in `sfdisk -l 2>/dev/null | awk '/ 82 / { print $1}'`; do - swap_devices="$swap_devices $part" - done -fi - -# Set NBD_SWAP=true by default for clients with RAM < NBD_SWAP_THRESHOLD -if [ -z "$NBD_SWAP" ]; then - # Set reasonable defaults for NBD_SWAP_THRESHOLD (in MB) - if [ -z "$NBD_SWAP_THRESHOLD" ]; then - if boolean_is_true "$LTSP_FATCLIENT"; then - NBD_SWAP_THRESHOLD=800 - else - NBD_SWAP_THRESHOLD=300 - fi - fi - memtotal=$(sed -n 's/MemTotal: *\([0-9]*\) .*/\1/p' /proc/meminfo) - if [ "$memtotal" -lt $((1024*$NBD_SWAP_THRESHOLD)) ]; then - NBD_SWAP=true - fi -fi - -if boolean_is_true "$NBD_SWAP" ; then - NBD_SWAP_HOST=${NBD_SWAP_HOST:-"$SERVER"} - modprobe nbd - # Detect first unused nbd device, skip nbd0 - for num in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do - nbd-client -c /dev/nbd${num} > /dev/null - [ $? -eq 1 ] && break - done - # TODO: add -persist here when LP: #938511 is solved, but also verify that - # we'll get the same file from the server without `mkswap` called again. - nbd-client $NBD_SWAP_HOST -N swap /dev/nbd${num} -swap && \ - swap_devices="$swap_devices /dev/nbd${num}" -fi - -if boolean_is_true "$ENCRYPT_SWAP" ; then - if [ -x /sbin/cryptsetup ]; then - modprobe dm_crypt - else - echo "ERROR: ENCRYPT_SWAP=Y, but /sbin/cryptsetup not found. disabling swap." - swap_devices="" - fi -fi - -num=0 -for device in $swap_devices ; do - swap="$device" - if boolean_is_true "$ENCRYPT_SWAP" ; then - if [ -x /sbin/cryptsetup ]; then - cryptsetup -d /dev/urandom create swap$num $swap && swap="/dev/mapper/swap$num" - num=$(($num+1)) - fi - mkswap $swap - fi - swapon $swap -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-syslog ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-syslog --- ltsp-5.3.6/client/init-ltsp.d/Gentoo/50-syslog 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Gentoo/50-syslog 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -if [ -z "$SYSLOG" ] || [ "$SYSLOG" = "remote" ]; then - syslog_conf=/etc/syslog.conf - if [ -d /etc/rsyslog.d ]; then - syslog_conf=/etc/rsyslog.d/ltsp.conf - touch $syslog_conf - fi - if [ -f "$syslog_conf" ]; then - cat < "$syslog_conf" -*.* @${SYSLOG_HOST:-$SERVER} -EOF - fi -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/01-clean-cache ltsp-5.3.7/client/init-ltsp.d/Ubuntu/01-clean-cache --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/01-clean-cache 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/01-clean-cache 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# Make sure our cache dirs are there -mkdir -p /var/cache/ltsp -mkdir -p /var/cache/ltsp-localapps - -# Also delete the cache files in case they exist in the underlying root rofs. -rm -f /var/cache/ltsp/ltsp_config /var/cache/ltsp/ltsp_config_env diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/02-initramfs-env ltsp-5.3.7/client/init-ltsp.d/Ubuntu/02-initramfs-env --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/02-initramfs-env 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/02-initramfs-env 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# Source some files saved by the initramfs. -# Those environment variables, e.g. HOSTNAME, can be overriden by lts.conf. - -for netfile in /var/cache/ltsp/net-*.conf ; do - if [ -f "$netfile" ]; then - . "$netfile" - fi -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/03-kernel-cmdline ltsp-5.3.7/client/init-ltsp.d/Ubuntu/03-kernel-cmdline --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/03-kernel-cmdline 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/03-kernel-cmdline 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -# Get NBD_ROOT_HOST or NFS_SERVER from the kernel command line. - -if [ -n "$NBD_ROOT_HOST" ] || [ -n "$NFS_SERVER" ]; then - return -fi - -for x in $(cat /proc/cmdline); do - case "$x" in - nbdroot=*) - netroot="${x#nbdroot=}" - nbd=true - break - ;; - nfsroot=*) - netroot="${x#nfsroot=}" - nfs=true - break - ;; - esac -done - -# The code below is stripped from local-top/nbd -case "$netroot" in - \[*\]*) - # [ipv6]:port/path - netsrv=${netroot%\]*} - netsrv=${netsrv#\[} - netportpath=${netroot#\[$netsrv\]} - netportpath=${netportpath#:} - netport=${netportpath%%/*} - netpath=${netportpath#$netport} - ;; - *) - # ipv4:port/path - netsrv=${netroot%%[:/]*} - netportpath=${netroot#$netsrv} - netportpath=${netportpath#:} - netport=${netportpath%%/*} - netpath=${netportpath#$netport} - ;; -esac - -# If not specified in the kernel cmdline, use the value from DHCP -netsrv=${netsrv:-$ROOTSERVER} - -if [ -n "$nbd" ]; then - export NBD_ROOT_HOST="$netsrv" - echo "NBD_ROOT_HOST=$NBD_ROOT_HOST" - case "$netport" in - *[!0-9]*) - # non-numeric characters, assume a name rather than a port - netpath="$netport" - unset netport - ;; - esac - if [ -n "$netpath" ]; then - export NBD_ROOT_NAME="$netpath" - echo "NBD_ROOT_NAME=$NBD_ROOT_NAME" - fi - if [ -n "$netport" ]; then - export NBD_ROOT_PORT="$netport" - echo "NBD_ROOT_PORT=$NBD_ROOT_PORT" - fi -elif [ -n "$nfs" ]; then - export NFS_SERVER="$netsrv" - echo "NFS_SERVER=$NFS_SERVER" -fi >> /var/cache/ltsp/ltsp_config diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/04-server ltsp-5.3.7/client/init-ltsp.d/Ubuntu/04-server --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/04-server 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/04-server 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -# Ensure a default for SERVER. It may be overriden later on by lts.conf. -if [ -n "$NBD_ROOT_HOST" ]; then - export SERVER="$NBD_ROOT_HOST" -elif [ -n "$NFS_SERVER" ]; then - export SERVER="$NFS_SERVER" -else - test -f /proc/mounts && while read MOUNTED_DEVICE MOUNTPOINT FSTYPE OPTIONS PASS1 PASS2; do - case $MOUNTED_DEVICE in - /dev/nbd[0-9]*) - if [ "$MOUNTPOINT" = "/rofs" ] || [ "$MOUNTPOINT" = "/" ]; then - # check for NBD devices - pid=$(nbd-client -c $MOUNTED_DEVICE) - - if grep -q '\-N' /proc/$pid/cmdline; then - server=$(cut -d '' -f 2 /proc/$pid/cmdline) - name=$(cut -d '' -f 5 /proc/$pid/cmdline) - else - server=$(cut -d '' -f 2 /proc/$pid/cmdline) - port=$(cut -d '' -f 3 /proc/$pid/cmdline) - fi - - # Check for nbd-proxy - if [ "$server" = "127.0.0.1" ]; then - server=$(ps --no-headers -o cmd x | grep "^nbd-proxy [[:graph:]]* [[:graph:]]* ${port}" | cut -d ' ' -f2) - fi - fi - echo "NBD_ROOT_HOST=${server}" >> /var/cache/ltsp/ltsp_config - if [ -n "$name" ]; then - echo "NBD_ROOT_NAME=${name}" >> /var/cache/ltsp/ltsp_config - else - echo "NBD_ROOT_PORT=${port}" >> /var/cache/ltsp/ltsp_config - fi - ;; - *) - if [ "$FSTYPE" = "nfs" ]; then - if [ "$MOUNTPOINT" = "/" ] || [ "$MOUNTPOINT" = "/rofs" ]; then - # NFS root - server=${MOUNTED_DEVICE%%:*} - echo NFS_SERVER=${server} >> /var/cache/ltsp/ltsp_config - fi - fi - ;; - esac - [ -n "$server" ] && break - done < /proc/mounts - - SERVER="${server:-$ROOTSERVER}" - export SERVER="${SERVER:-192.168.0.1}" -fi -echo "SERVER=$SERVER" >> /var/cache/ltsp/ltsp_config diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/05-getltsconffile ltsp-5.3.7/client/init-ltsp.d/Ubuntu/05-getltsconffile --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/05-getltsconffile 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/05-getltsconffile 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# get the lts.conf via tftp - -# $filename comes from net-eth0.conf and is usually "//pxelinux.0". -# If it contains a path, we want to construct "//lts.conf". -# If it doesn't, we want just "lts.conf" without inserting a slash, as some tftp -# servers have problems with it. Finally, if $filename isn't set, we want to -# default to "/ltsp/i386/lts.conf". -if [ -n "$SERVER" ]; then - fileonly=${filename##*/} - pathonly=${filename%$fileonly} - lts_conf_temp=$(mktemp) - tftp "$SERVER" -c get ${pathonly:-/ltsp/i386/}lts.conf $lts_conf_temp >/dev/null - # only overwrite lts.conf if it has non-zero size. - if [ -s "$lts_conf_temp" ]; then - mv "$lts_conf_temp" /etc/lts.conf - else - rm "$lts_conf_temp" - fi -fi - -# Get the lts.conf vars into the environment -. /usr/share/ltsp/ltsp_config diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/06-ltsp-init-common ltsp-5.3.7/client/init-ltsp.d/Ubuntu/06-ltsp-init-common --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/06-ltsp-init-common 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/06-ltsp-init-common 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# This file is sourced - -. /usr/share/ltsp/ltsp-init-common diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/09-hostname ltsp-5.3.7/client/init-ltsp.d/Ubuntu/09-hostname --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/09-hostname 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/09-hostname 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -if [ -z "$HOSTNAME" ]; then - HOSTNAME_BASE=${HOSTNAME_BASE:-ltsp} - case "$HOSTNAME_EXTRA" in - mac) - HOSTNAME_EXTRA=$(ip link show $DEVICE | awk '/ether/{print $2}' | tr ':' '-') - ;; - ip|"") - HOSTNAME_EXTRA=$(echo "$IPV4ADDR.$IPV4NETMASK" | awk -F "." '{ print (($1%(256-$5)*256+$2%(256-$6))*256+$3%(256-$7))*256+$4%(256-$8) }') - ;; - esac - HOSTNAME="$HOSTNAME_BASE$HOSTNAME_EXTRA" -fi - -hostname "$HOSTNAME" -echo "$HOSTNAME" > /etc/hostname - -cat < /etc/hosts -127.0.0.1 localhost -127.0.0.2 $HOSTNAME -$SERVER server - -# The following lines are desirable for IPv6 capable hosts -::1 ip6-localhost ip6-loopback -fe00::0 ip6-localnet -ff00::0 ip6-mcastprefix -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters -EOF - -if [ -f /etc/hosts.ltsp ]; then - cat /etc/hosts.ltsp >> /etc/hosts -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/10-resolv-conf ltsp-5.3.7/client/init-ltsp.d/Ubuntu/10-resolv-conf --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/10-resolv-conf 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/10-resolv-conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -# This file is sourced. - -# set to defaults from DHCP if not specified in lts.conf -if [ -z "$DNS_SERVER" ]; then - for dns in $IPV4DNS0 $IPV4DNS1 ; do - # ignore nameserver of 0.0.0.0, which ipconfig may return if both - # nameservers aren't specified. - if [ "$dns" != "0.0.0.0" ]; then - DNS_SERVER="$DNS_SERVER $dns" - fi - done -fi - -if [ -z "$SEARCH_DOMAIN" ] && [ -n "$DNSDOMAIN" ]; then - SEARCH_DOMAIN="$DNSDOMAIN" -fi - -# Apply the dns info that was received from dhcp or from lts.conf -if [ -n "$DNS_SERVER" ] || [ -n "$SEARCH_DOMAIN" ]; then - # Deal with resolvconf - if [ -x /sbin/resolvconf ] && ( [ -L /etc/resolv.conf ] || [ -e /var/lib/resolvconf/convert ] ); then - mkdir -p /run/resolvconf/interface/ - resolv_method=resolvconf - resolv=/run/resolvconf/interface/LTSP - else - resolv_method=static - resolv=/etc/resolv.conf - fi - - # Check if $resolv is writable - if echo '# Generated by ltsp' 2>/dev/null > "$resolv"; then - if [ -n "$SEARCH_DOMAIN" ]; then - echo "search $SEARCH_DOMAIN" >> "$resolv" - fi - for n in $DNS_SERVER; do - echo "nameserver $n" >> "$resolv" - done - fi -fi -true diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/20-modules ltsp-5.3.7/client/init-ltsp.d/Ubuntu/20-modules --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/20-modules 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/20-modules 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# Load extra modules here, in case they affect other plugins -for module in $(env|grep ^MODULE_|sed -e s/^MODULE_[0-9]*\=//|sed -e s/\ /*/g);do - modprobe $(echo $module|tr "*" " ") -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-client-mac ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-client-mac --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-client-mac 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-client-mac 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -# Save some useful initrams vars - -# The boot interface name was stored in ltsp_config from the initramfs -test -n "$DEVICE" || return 0 - -# Also save the MAC address of the boot interface -LTSP_CLIENT_MAC=$(ip -oneline -family inet link show dev "$DEVICE" | sed -n '/.*ether[[:space:]]*\([[:xdigit:]:]*\).*/{s//\1/;y/abcdef-/ABCDEF:/;p}') -if [ -n "$LTSP_CLIENT_MAC" ]; then - export LTSP_CLIENT_MAC - echo "LTSP_CLIENT_MAC=$LTSP_CLIENT_MAC" >> /var/cache/ltsp/ltsp_config -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-cron ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-cron --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-cron 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-cron 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -CRON_FILE=/etc/cron.d/ltsp -if [ ! -w "/etc/cron.d" ]; then - echo "Warning: /etc/cron.d is not writeable." - return 1 -fi -if [ -n "$SHUTDOWN_TIME" ] ; then - echo $SHUTDOWN_TIME | awk -F : '{print $2" "$1" * * * root test ! -S \"$(ls -1 /var/run/ldm_socket_* | head -1)\" && PATH=\$PATH:/sbin/ poweroff" }' >> $CRON_FILE -fi -env | sed -n 's/^CRONTAB_[0-9][0-9]=//p' >> $CRON_FILE diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-default-display-manager ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-default-display-manager --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-default-display-manager 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-default-display-manager 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -# Set ldm as the default-display-manager to prevent other display managers -# from starting, until ldm implements the full protocol itself. -if [ -f /etc/X11/default-display-manager ]; then - # Set DEFAULT_DISPLAY_MANAGER="" in lts.conf to leave the existing one, - # or DEFAULT_DISPLAY_MANAGER="/path/to/dm" to force another. - dm=${DEFAULT_DISPLAY_MANAGER-/usr/sbin/ldm} - if [ -n "$dm" ] ; then - echo "$dm" > /etc/X11/default-display-manager - fi -fi - diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-disable-cronjobs ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-disable-cronjobs --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-disable-cronjobs 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-disable-cronjobs 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# Disable several cronjobs that are usually present but that -# cause unnecessary load. - -while read job; do - rm -f "$job" -done </etc/fstab < -proc /proc proc nodev,noexec,nosuid 0 0 -EOF - -# Backwards compatibility for the deprecated NFS_HOME lts.conf option -if [ -n "$NFS_HOME" ]; then - # if $NFS_HOME doesn't contain a :/ part - if [ "$NFS_HOME" = ${NFS_HOME#*:} ]; then - # Ensure that it begins with a slash, and also add the server - NFS_HOME="/${NFS_HOME#/}" - NFS_HOME="$SERVER:$NFS_HOME" - fi - mntpt=${NFS_HOME##*:} - test -n "$mntpt" && mkdir -p "$mntpt" - NFS_HOME_OPTIONS=${NFS_HOME_OPTIONS:-defaults} - echo "$NFS_HOME $mntpt nfs $NFS_HOME_OPTIONS 0 0" >> /etc/fstab -fi - -# Put FSTAB_0 to FSTAB_9 lts.conf options to fstab -env | sed -n '/^FSTAB_[0-9]=/s///p' >> /etc/fstab diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-gsettings-overrides ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-gsettings-overrides --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-gsettings-overrides 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-gsettings-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -if boolean_is_true "$LTSP_FATCLIENT" && - [ -f /usr/share/glib-2.0/schemas/org.gnome.desktop.lockdown.gschema.xml ] && - [ -x /usr/bin/glib-compile-schemas ]; then - cat >> /usr/share/glib-2.0/schemas/10_ltsp.gschema.override <> "/etc/network/interfaces" 2>/dev/null || true -fi - diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-jetpipe ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-jetpipe --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-jetpipe 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-jetpipe 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -for I in 0 1 2; do - eval PRINTER_DEVICE=\$\{PRINTER_${I}_DEVICE\} - if [ -n "${PRINTER_DEVICE}" ]; then - eval PORT=\$\{PRINTER_${I}_PORT:="910${I}"\} - eval BAUD=\$\{PRINTER_${I}_SPEED:-"9600"\} - eval SIZE=\$\{PRINTER_${I}_DATABITS:-"8"\} - eval PARITY=\$\{PRINTER_${I}_PARITY:-"none"\} - eval FLOW=\$\{PRINTER_${I}_FLOWCTRL:-"soft"\} - - JETPIPE_ARGS= - [ -n "$BAUD" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -b ${BAUD}" - [ -n "$SIZE" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -y ${SIZE}" - [ -n "$PARITY" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -p ${PARITY}" - if [ -n "$FLOW" ]; then - if [ "$FLOW" = "soft" ]; then - JETPIPE_ARGS="${JETPIPE_ARGS} -x" - else - JETPIPE_ARGS="${JETPIPE_ARGS} -r" - fi - fi - - /usr/sbin/jetpipe ${JETPIPE_ARGS} ${PRINTER_DEVICE} ${PORT} - fi -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-mtab ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-mtab --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-mtab 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-mtab 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -# This file is sourced - -# make the chroot's /etc/mtab a file rather than a link -# because mountall.conf complains loudly -if [ -L /etc/mtab ]; then - rm /etc/mtab - :>/etc/mtab -fi - diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-rcfiles ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-rcfiles --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-rcfiles 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-rcfiles 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# Sample rc.local may end with "exit 0", remove it if it's in the last line -sed '${/^exit 0$/d;}' -i /etc/rc.local - -env | sed -n 's/^RCFILE_[0-9][0-9]=//p' >> /etc/rc.local diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-rm-session-services ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-rm-session-services --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-rm-session-services 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-rm-session-services 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# For fat clients, remove some autostart items that don't make sense in live -# sessions. The user can add more items by declaring a space separated -# RM_SESSION_SERVICES list in lts.conf. - -# For readability, include the comment line from service.desktop. - -# Notify about new hardware drivers available for the system -RM_SESSION_SERVICES="$RM_SESSION_SERVICES jockey-gtk" - -# Check for available updates automatically -RM_SESSION_SERVICES="$RM_SESSION_SERVICES update-notifier" - -for file in $RM_SESSION_SERVICES; do - if [ -f "/etc/xdg/autostart/$file.desktop" ]; then - rm -f "/etc/xdg/autostart/$file.desktop" - fi -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-rm-system-services ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-rm-system-services --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-rm-system-services 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-rm-system-services 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -# Remove some system services that don't make sense in live sessions. -# The user can add more items by declaring space separated RM_SYSTEM_SERVICES -# or RM_THIN_SYSTEM_SERVICES lists in lts.conf. The RM_THIN_SYSTEM_SERVICES list -# is ignored by fat clients. -# KEEP_SYSTEM_SERVICES is a space separated whitelist of services. - -allowed_services() { - local service description - - echo "$@" | while read service description; do - case " $KEEP_SYSTEM_SERVICES " in - *" $service "*) - ;; - *) - echo -n " $service" - ;; - esac - done -} - -# $RM_SYSTEM_SERVICES are removed for all clients -rm_services="$RM_SYSTEM_SERVICES $(allowed_services " -alsa-restore # Restore sound card(s') mixer state(s) -alsa-store # Save sound card(s') mixer state(s) -grub-common # Record successful boot for GRUB -lightdm # Light Display Manager -modemmanager # Modem manager -nbd-client # Network Block Device client (we use nbd-disconnect) -plymouth-stop # Hide the splash screen -rfkill-store # Store software rfkill state -tty2 # Getty -tty3 # Getty -tty4 # Getty -tty5 # Getty -tty6 # Getty -unattended-upgrades # Check if unattended upgrades are being applied -urandom # Save and restore random seed between restarts -ureadahead # Read required files in advance -ureadahead-other # Read required files in advance for other mountpoints -")" - -# $RM_THIN_SYSTEM_SERVICES are removed for thin clients -if ! boolean_is_true "$LTSP_FATCLIENT"; then - rm_services="$rm_services $RM_THIN_SYSTEM_SERVICES $(allowed_services " -acpid # ACPI daemon -apparmor # AppArmor initialization -apport # Automatic crash report generation -atd # Deferred execution scheduler -avahi-daemon # mDNS/DNS-SD daemon -bluetooth # Bluetooth daemon -brltty # Braille terminal driver -cups # CUPS Printing spooler and server -kerneloops # Collects and submits kernel crash signatures -network-manager # Network connection manager -ufw # Uncomplicated Firewall -upstart-socket-bridge # Bridge socket events into upstart -")" - - # For low RAM thin clients, disable whatever isn't essential for booting - memtotal=$(sed -n 's/MemTotal: *\([0-9]*\) .*/\1/p' /proc/meminfo) - memtotal=$(($memtotal / 1024)) - RM_RAM_THRESHOLD=${RM_RAM_THRESHOLD:-128} - if [ "$memtotal" -le "$RM_RAM_THRESHOLD" ]; then - rm_services="$rm_services $RM_LOW_RAM_SERVICES $(allowed_services " -anacron # anac(h)ronistic cron -dbus # D-Bus system message bus -cron # Regular background program processing daemon -rsyslog # System logging daemon -tty1 # Getty -upstart-udev-bridge # Bridge udev events into upstart -")" - fi -fi - -# We don't need NFS-related services if we're not using nfs -if ! grep -q nfs /etc/fstab; then - rm_services="$rm_services $(allowed_services " -idmapd # NFSv4 id <-> name mapper -portmap # RPC portmapper replacement -rpcbind-boot # RPC portmapper replacement -")" -fi - -for service in $rm_services; do - rm -f /etc/rc?.d/???"$service" "/etc/init.d/$service" "/etc/init/$service.conf" -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-sendsigs ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-sendsigs --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-sendsigs 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-sendsigs 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -if [ -n "$NBD_ROOT_HOST" ]; then - # register pids of nbd-client and nbd-proxy so that sendsigs doesn't kill - # them on shutdown/reboot. - - # FIXME: only register pids relevent to the root filesystem. - nbd_pids=$(pgrep '^nbd-client|^nbd-proxy') - for d in /run/sendsigs.omit.d /lib/init/rw/sendsigs.omit.d /var/run/sendsigs.omit.d ; do - if [ -d "$d" ]; then - for p in $nbd_pids ; do - echo "$p" >> "$d"/ltsp || true - done - fi - done -fi diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-swap ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-swap --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-swap 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-swap 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -if boolean_is_true "$USE_LOCAL_SWAP" ; then - # Enable local swap partition if found on local disk - for part in `sfdisk -l 2>/dev/null | awk '/ 82 / { print $1}'`; do - swap_devices="$swap_devices $part" - done -fi - -# Set NBD_SWAP=true by default for clients with RAM < NBD_SWAP_THRESHOLD -if [ -z "$NBD_SWAP" ]; then - # Set reasonable defaults for NBD_SWAP_THRESHOLD (in MB) - if [ -z "$NBD_SWAP_THRESHOLD" ]; then - if boolean_is_true "$LTSP_FATCLIENT"; then - NBD_SWAP_THRESHOLD=800 - else - NBD_SWAP_THRESHOLD=300 - fi - fi - memtotal=$(sed -n 's/MemTotal: *\([0-9]*\) .*/\1/p' /proc/meminfo) - if [ "$memtotal" -lt $((1024*$NBD_SWAP_THRESHOLD)) ]; then - NBD_SWAP=true - fi -fi - -if boolean_is_true "$NBD_SWAP" ; then - NBD_SWAP_HOST=${NBD_SWAP_HOST:-"$SERVER"} - modprobe nbd - # Detect first unused nbd device, skip nbd0 - for num in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do - nbd-client -c /dev/nbd${num} > /dev/null - [ $? -eq 1 ] && break - done - # TODO: add -persist here when LP: #938511 is solved, but also verify that - # we'll get the same file from the server without `mkswap` called again. - nbd-client $NBD_SWAP_HOST -N swap /dev/nbd${num} -swap && \ - swap_devices="$swap_devices /dev/nbd${num}" -fi - -if boolean_is_true "$ENCRYPT_SWAP" ; then - if [ -x /sbin/cryptsetup ]; then - modprobe dm_crypt - else - echo "ERROR: ENCRYPT_SWAP=Y, but /sbin/cryptsetup not found. disabling swap." - swap_devices="" - fi -fi - -num=0 -for device in $swap_devices ; do - swap="$device" - if boolean_is_true "$ENCRYPT_SWAP" ; then - if [ -x /sbin/cryptsetup ]; then - cryptsetup -d /dev/urandom create swap$num $swap && swap="/dev/mapper/swap$num" - num=$(($num+1)) - fi - mkswap $swap - fi - swapon $swap -done diff -Nru ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-syslog ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-syslog --- ltsp-5.3.6/client/init-ltsp.d/Ubuntu/50-syslog 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/init-ltsp.d/Ubuntu/50-syslog 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -if [ -z "$SYSLOG" ] || [ "$SYSLOG" = "remote" ]; then - syslog_conf=/etc/syslog.conf - if [ -d /etc/rsyslog.d ]; then - syslog_conf=/etc/rsyslog.d/ltsp.conf - touch $syslog_conf - fi - if [ -f "$syslog_conf" ]; then - cat < "$syslog_conf" -*.* @${SYSLOG_HOST:-$SERVER} -EOF - fi -fi diff -Nru ltsp-5.3.6/client/initramfs/scripts/init-premount/udhcp ltsp-5.3.7/client/initramfs/scripts/init-premount/udhcp --- ltsp-5.3.6/client/initramfs/scripts/init-premount/udhcp 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/initramfs/scripts/init-premount/udhcp 2012-04-03 18:39:07.000000000 +0000 @@ -1,7 +1,5 @@ #!/bin/sh ################################################################################ -# Notes - TODO: delete after reading :-) -################################################################################ # Except for any bugs, it should be able to cope with the following scenarios: # # 1) One NIC, no kernel parameters: @@ -26,11 +24,6 @@ # It'll use DHCP on the specified device but override server-ip and hostname with the static ones. #10) Two or more NICs, IPAPPEND 3 and autoconf=dhcp: # It'll use DHCP on the specified NIC and override server-ip and hostname with the static ones. -# -# -# My favorite pxelinux.cfg/default includes both IPAPPEND 3 and autoconf=dhcp. -# This makes it work *optimally* (i.e. DHCP request only for the boot interface) in *any* case. -# ################################################################################ PREREQ="" @@ -48,6 +41,9 @@ ;; esac +# Exit if an LTSP boot was not requested +grep -Eqsw "init=/sbin/init-ltsp|ltsp" /proc/cmdline || exit 0 + bring_up_interfaces() { # Wait for the interfaces to become available diff -Nru ltsp-5.3.6/client/initscripts/ALTLinux/ltsp-client.init.in ltsp-5.3.7/client/initscripts/ALTLinux/ltsp-client.init.in --- ltsp-5.3.6/client/initscripts/ALTLinux/ltsp-client.init.in 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/initscripts/ALTLinux/ltsp-client.init.in 2012-04-03 18:39:07.000000000 +0000 @@ -19,7 +19,7 @@ LOCKFILE=/var/lock/subsys/ltsp-client RETVAL=0 -SourceIfNotEmpty /usr/share/ltsp/ltsp-common-functions +SourceIfNotEmpty /usr/share/ltsp/ltsp-client-functions [ -f /etc/ltsp_chroot ] && SourceIfNotEmpty /usr/share/ltsp/ltsp_config || exit 0 # Set variable diff -Nru ltsp-5.3.6/client/initscripts/ALTLinux/ltsp-client-swap.init ltsp-5.3.7/client/initscripts/ALTLinux/ltsp-client-swap.init --- ltsp-5.3.6/client/initscripts/ALTLinux/ltsp-client-swap.init 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/initscripts/ALTLinux/ltsp-client-swap.init 2012-04-03 18:39:07.000000000 +0000 @@ -19,7 +19,7 @@ LOCKFILE=/var/lock/subsys/ltsp-client-swap RETVAL=0 -SourceIfNotEmpty /usr/share/ltsp/ltsp-common-functions +SourceIfNotEmpty /usr/share/ltsp/ltsp-client-functions [ -f /etc/ltsp_chroot ] && SourceIfNotEmpty /usr/share/ltsp/ltsp_config || exit 0 FST=`which fstyp 2>/dev/null` || FST=`which fstype 2>/dev/null` || FST=`which sfdisk 2>/dev/null` || FST=`which fdisk 2>/dev/null` || FST=`which file 2>/dev/null` diff -Nru ltsp-5.3.6/client/initscripts/ALTLinux/start_printer ltsp-5.3.7/client/initscripts/ALTLinux/start_printer --- ltsp-5.3.6/client/initscripts/ALTLinux/start_printer 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/initscripts/ALTLinux/start_printer 2012-04-03 18:39:07.000000000 +0000 @@ -8,7 +8,7 @@ PNUM=$1 -. /usr/share/ltsp/ltsp-common-functions +. /usr/share/ltsp/ltsp-client-functions eval DEVICE=\$PRINTER_${PNUM}_DEVICE diff -Nru ltsp-5.3.6/client/initscripts/ltsp-core ltsp-5.3.7/client/initscripts/ltsp-core --- ltsp-5.3.6/client/initscripts/ltsp-core 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/initscripts/ltsp-core 2012-04-03 18:39:07.000000000 +0000 @@ -44,14 +44,14 @@ eval $(getltscfg-cluster -a -l boot) || true fi + if [ -x /bin/plymouth ]; then + /bin/plymouth quit --retain-splash + fi + start_screen_sessions || true start_sound || true log_action_end_msg 0 - - if [ -x /bin/plymouth ]; then - /bin/plymouth quit --retain-splash - fi ;; stop) # This means that an LTSP client is shutting down or rebooting. diff -Nru ltsp-5.3.6/client/initscripts/ltsp-core.upstart ltsp-5.3.7/client/initscripts/ltsp-core.upstart --- ltsp-5.3.6/client/initscripts/ltsp-core.upstart 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/initscripts/ltsp-core.upstart 2012-04-03 18:39:07.000000000 +0000 @@ -23,12 +23,12 @@ eval $(getltscfg-cluster -a -l boot) || true fi - start_screen_sessions || true - start_sound || true - if [ -x /bin/plymouth ]; then /bin/plymouth quit --retain-splash || true fi + + start_screen_sessions || true + start_sound || true end script post-stop script diff -Nru ltsp-5.3.6/client/initscripts/ltsp-init-common ltsp-5.3.7/client/initscripts/ltsp-init-common --- ltsp-5.3.6/client/initscripts/ltsp-init-common 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/initscripts/ltsp-init-common 2012-04-03 18:39:07.000000000 +0000 @@ -1,6 +1,6 @@ # Common functions shared by LTSP init scripts -# ltsp_config sources ltsp-common-functions +# ltsp_config sources ltsp-client-functions . /usr/share/ltsp/ltsp_config warn() { diff -Nru ltsp-5.3.6/client/ltsp-client-common-functions ltsp-5.3.7/client/ltsp-client-common-functions --- ltsp-5.3.6/client/ltsp-client-common-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/client/ltsp-client-common-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,89 @@ +# Common functions shared by LTSP scripts + +die() { + echo "$@" >&2 + exit 1 +} + +boolean_is_true(){ + case $1 in + # match all cases of true|y|yes + [Tt][Rr][Uu][Ee]|[Yy]|[Yy][Ee][Ss]) return 0 ;; + *) return 1 ;; + esac +} + +# list files in a directory consisting only of alphanumerics, hyphens and +# underscores +# $1 - directory to list +# $2 - optional prefix to limit which files are selected +run_parts_list() { + test $# -ge 1 || die "ERROR: Usage: run_parts_list " + if [ -d "$1" ]; then + find -L "$1" -mindepth 1 -maxdepth 1 -type f -name "$2*" | + sed -n '/.*\/[0-9a-zA-Z_\-]\{1,\}$/p' | sort -n + fi +} + +detect_vendor() { + if [ -e /etc/sysconfig/ltspdist ]; then + . /etc/sysconfig/ltspdist + echo "$VENDORDEF" + else + echo $(lsb_release --id --short | tr " " "_") + fi +} + +# Distros may override this function to implement their own +# architecture detection. +detect_arch() { + echo $(uname -m) +} + +require_root() +{ + if [ ${UID:-$(id -u)} -ne 0 ]; then + die "Superuser privileges are needed." + fi +} + +# Remember mounted dirs so that it's easier to unmount them with a single call +# to umount_marked. They'll be unmounted in reverse order. +# Use the normal mount syntax, e.g. +# mark_mount -t proc proc "$ROOT/proc" +mark_mount() { + local dir + + # The last parameter is the dir we need to remember to unmount + dir=$(eval "echo \$$#") + if mount "$@"; then + # Use newlines to separate dirs, in case they contain spaces + if [ -z "$MARKED_MOUNTS" ]; then + MARKED_MOUNTS="$dir" + else + MARKED_MOUNTS="$dir +$MARKED_MOUNTS" + fi + else + die "Could not mount $dir." + fi +} + +umount_marked() { + [ -z "$MARKED_MOUNTS" ] && return + + echo "$MARKED_MOUNTS" | while read dir; do + if ! umount "$dir"; then + echo "Couldn't unmount $dir." >&2 + fi + done +} + +# Source tool-specific functions, if they're provided. +# Recursive inclusions shouldn't ever happen, but let's prevent them anyway. +if [ -z "$ltsp_tool" ]; then + ltsp_tool=${0##*/} + if [ -f "/usr/share/ltsp/$ltsp_tool-functions" ]; then + . "/usr/share/ltsp/$ltsp_tool-functions" + fi +fi diff -Nru ltsp-5.3.6/client/ltsp-client-functions ltsp-5.3.7/client/ltsp-client-functions --- ltsp-5.3.6/client/ltsp-client-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/client/ltsp-client-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,9 @@ +# Common functions shared by LTSP scripts +if [ -f /usr/share/ltsp/ltsp-client-common-functions ]; then + . /usr/share/ltsp/ltsp-client-common-functions +fi + +# Sourcing distro specific overrides. +if [ -f /usr/share/ltsp/ltsp-client-vendor-functions ]; then + . /usr/share/ltsp/ltsp-client-vendor-functions +fi diff -Nru ltsp-5.3.6/client/ltsp_config ltsp-5.3.7/client/ltsp_config --- ltsp-5.3.6/client/ltsp_config 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/ltsp_config 2012-04-03 18:39:07.000000000 +0000 @@ -36,14 +36,14 @@ # # -# Source ltsp-common-functions if we have not already (needed in some functions) +# Source ltsp-client-functions if we have not already (needed in some functions) # We set PATH to empty string here (in the subshell), because shell will look # for boolean_is_true in PATH if it doesn't find it as a built-in function # That search is a waste of time and so, we avoid it by not giving a PATH. # # Also, let's call this at the very beginning to make absolutely sure that -# anything that calls ltsp_config will have ltsp-common-functions sourced -(PATH="" boolean_is_true True 2>/dev/null) || . /usr/share/ltsp/ltsp-common-functions || true +# anything that calls ltsp_config will have ltsp-client-functions sourced +(PATH="" boolean_is_true True 2>/dev/null) || . /usr/share/ltsp/ltsp-client-functions || true # Once lts.conf params are processed, they should all be stored # in a quickly source-able file: /var/cache/ltsp/ltsp_config_env diff -Nru ltsp-5.3.6/client/screen_session ltsp-5.3.7/client/screen_session --- ltsp-5.3.6/client/screen_session 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/screen_session 2012-04-03 18:39:07.000000000 +0000 @@ -31,7 +31,7 @@ # # Load LTSP configuration -# ltsp_config sources ltsp-common-functions +# ltsp_config sources ltsp-client-functions . /usr/share/ltsp/ltsp_config case "$1" in diff -Nru ltsp-5.3.6/client/screen-session.d/XS95-colordepth ltsp-5.3.7/client/screen-session.d/XS95-colordepth --- ltsp-5.3.6/client/screen-session.d/XS95-colordepth 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/screen-session.d/XS95-colordepth 2012-04-03 18:39:07.000000000 +0000 @@ -1,5 +1,10 @@ ### color depth +# Default to 16 bpp for thin clients +if boolean_is_true "${X_SMART_COLOR_DEPTH:-True}" && ! boolean_is_true "${LTSP_FATCLIENT}"; then + X_COLOR_DEPTH=16 +fi + if [ -n "$X_COLOR_DEPTH" ]; then # Set color depth if X_CONF has been set to our internally generated # XCONF file OR if no user-defined X_CONF file was specified. diff -Nru ltsp-5.3.6/client/screen-x-common ltsp-5.3.7/client/screen-x-common --- ltsp-5.3.6/client/screen-x-common 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/screen-x-common 2012-04-03 18:39:07.000000000 +0000 @@ -29,8 +29,8 @@ . /usr/share/ltsp/ltsp_config -# Source ltsp-common-functions if we have not already (needed in some functions) -(PATH="" boolean_is_true True 2>/dev/null) || . /usr/share/ltsp/ltsp-common-functions || true +# Source ltsp-client-functions if we have not already (needed in some functions) +(PATH="" boolean_is_true True 2>/dev/null) || . /usr/share/ltsp/ltsp-client-functions || true # # Compute tty and display diff -Nru ltsp-5.3.6/client/xinitrc ltsp-5.3.7/client/xinitrc --- ltsp-5.3.6/client/xinitrc 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/xinitrc 2012-04-03 18:39:07.000000000 +0000 @@ -35,7 +35,7 @@ # eval xinit "$* $LTS_OPTION1 $LTS_OPTION2" # Quoting the parameters is necessary in both cases to avoid glob expansion. -. /usr/share/ltsp/ltsp-common-functions +. /usr/share/ltsp/ltsp-client-functions XINITRCDIR=/usr/share/ltsp/xinitrc.d diff -Nru ltsp-5.3.6/client/xinitrc.d/I10-x-keyboard-settings ltsp-5.3.7/client/xinitrc.d/I10-x-keyboard-settings --- ltsp-5.3.6/client/xinitrc.d/I10-x-keyboard-settings 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/xinitrc.d/I10-x-keyboard-settings 2012-04-03 18:39:07.000000000 +0000 @@ -28,13 +28,3 @@ /usr/bin/setxkbmap $kbopts fi fi - -if [ -f /etc/default/console-setup ]; then - if [ -n "$XKBVARIANT" ]; then - sed -i "s/\(^XKBVARIANT=\"\).*\(\"\)/\1$XKBVARIANT\2/g" /etc/default/console-setup - fi - - if [ -n "$XKBLAYOUT" ]; then - sed -i "s/\(^XKBLAYOUT=\"\).*\(\"\)/\1$XKBLAYOUT\2/g" /etc/default/console-setup - fi -fi diff -Nru ltsp-5.3.6/client/xinitrc.d/I10-xrandr ltsp-5.3.7/client/xinitrc.d/I10-xrandr --- ltsp-5.3.6/client/xinitrc.d/I10-xrandr 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/client/xinitrc.d/I10-xrandr 2012-04-03 18:39:07.000000000 +0000 @@ -88,4 +88,11 @@ [ -n "${XRANDR_ARGS}" ] && ${XRANDR} ${XRANDR_ARGS} +# XRANDR_COMMAND_[0-9] can be a bit less complex and allows defining new modes +env | sed -n '/^XRANDR_COMMAND_[0-9]=/s///p' | while read command; do + # Remove possible "xrandr" in front of the command + command=${command#xrandr} + xrandr $command +done + fi # end of XRANDR_DISABLE=False conditional diff -Nru ltsp-5.3.6/common/ltsp-common-functions ltsp-5.3.7/common/ltsp-common-functions --- ltsp-5.3.6/common/ltsp-common-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/common/ltsp-common-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,89 @@ +# Common functions shared by LTSP scripts + +die() { + echo "$@" >&2 + exit 1 +} + +boolean_is_true(){ + case $1 in + # match all cases of true|y|yes + [Tt][Rr][Uu][Ee]|[Yy]|[Yy][Ee][Ss]) return 0 ;; + *) return 1 ;; + esac +} + +# list files in a directory consisting only of alphanumerics, hyphens and +# underscores +# $1 - directory to list +# $2 - optional prefix to limit which files are selected +run_parts_list() { + test $# -ge 1 || die "ERROR: Usage: run_parts_list " + if [ -d "$1" ]; then + find -L "$1" -mindepth 1 -maxdepth 1 -type f -name "$2*" | + sed -n '/.*\/[0-9a-zA-Z_\-]\{1,\}$/p' | sort -n + fi +} + +detect_vendor() { + if [ -e /etc/sysconfig/ltspdist ]; then + . /etc/sysconfig/ltspdist + echo "$VENDORDEF" + else + echo $(lsb_release --id --short | tr " " "_") + fi +} + +# Distros may override this function to implement their own +# architecture detection. +detect_arch() { + echo $(uname -m) +} + +require_root() +{ + if [ ${UID:-$(id -u)} -ne 0 ]; then + die "Superuser privileges are needed." + fi +} + +# Remember mounted dirs so that it's easier to unmount them with a single call +# to umount_marked. They'll be unmounted in reverse order. +# Use the normal mount syntax, e.g. +# mark_mount -t proc proc "$ROOT/proc" +mark_mount() { + local dir + + # The last parameter is the dir we need to remember to unmount + dir=$(eval "echo \$$#") + if mount "$@"; then + # Use newlines to separate dirs, in case they contain spaces + if [ -z "$MARKED_MOUNTS" ]; then + MARKED_MOUNTS="$dir" + else + MARKED_MOUNTS="$dir +$MARKED_MOUNTS" + fi + else + die "Could not mount $dir." + fi +} + +umount_marked() { + [ -z "$MARKED_MOUNTS" ] && return + + echo "$MARKED_MOUNTS" | while read dir; do + if ! umount "$dir"; then + echo "Couldn't unmount $dir." >&2 + fi + done +} + +# Source tool-specific functions, if they're provided. +# Recursive inclusions shouldn't ever happen, but let's prevent them anyway. +if [ -z "$ltsp_tool" ]; then + ltsp_tool=${0##*/} + if [ -f "/usr/share/ltsp/$ltsp_tool-functions" ]; then + . "/usr/share/ltsp/$ltsp_tool-functions" + fi +fi diff -Nru ltsp-5.3.6/debian/changelog ltsp-5.3.7/debian/changelog --- ltsp-5.3.6/debian/changelog 2012-03-30 14:21:08.000000000 +0000 +++ ltsp-5.3.7/debian/changelog 2012-04-03 18:46:57.000000000 +0000 @@ -1,3 +1,21 @@ +ltsp (5.3.7-0ubuntu1) precise; urgency=low + + * New upstream bugfix release (5.3.7). + - Improve bandwidth usage by setting color depth to 16bit + - Stop plymouth before starting start_screen_sessions + - Reorg of init-ltsp.d, ltsp-*-common-functions and functions.d + - Apply XKB* settings to /etc/default/keyboard. + - udhcp: exit if an LTSP boot was not requested. + - Check if LOCAL_APPS=True before calling ltsp-genmenu. + * Update source path of ltsp-chroot + * Deal with ltsp-{client,server}-common-functions being separate files now. + * Add ltsp-common-functions to ltsp-client-core for compatibility. + * Install the distributor functions in {client,server}/functions/Debian/* + * Drop xcompmgr for now, the dependency should be on ldm and it's currently + broken (needs a new ldm) + + -- Stéphane Graber Tue, 03 Apr 2012 14:44:12 -0400 + ltsp (5.3.6-0ubuntu4) precise; urgency=low * ltsp-client: Add dependency on xcompmgr to use compositing when available. diff -Nru ltsp-5.3.6/debian/control ltsp-5.3.7/debian/control --- ltsp-5.3.6/debian/control 2012-03-30 14:20:45.000000000 +0000 +++ ltsp-5.3.7/debian/control 2012-04-03 18:43:43.000000000 +0000 @@ -116,7 +116,6 @@ ttf-ubuntu-font-family, ttf-wqy-microhei, wget, - xcompmgr, xorg, ${misc:Depends}, ${shlibs:Depends} diff -Nru ltsp-5.3.6/debian/ltsp-client-core.install ltsp-5.3.7/debian/ltsp-client-core.install --- ltsp-5.3.6/debian/ltsp-client-core.install 2012-03-30 14:20:02.000000000 +0000 +++ ltsp-5.3.7/debian/ltsp-client-core.install 2012-04-02 19:58:52.000000000 +0000 @@ -1,14 +1,18 @@ client/configure-x.sh usr/share/ltsp +client/functions/Debian/* usr/share/ltsp/ client/getltscfg-cluster/getltscfg-cluster usr/bin client/getltscfg-cluster/inventory usr/sbin client/getltscfg/getltscfg usr/bin -client/init-ltsp.d/* usr/share/ltsp/init-ltsp.d/ +client/init-ltsp.d/common/* usr/share/ltsp/init-ltsp.d/ +client/init-ltsp.d/Debian/* usr/share/ltsp/init-ltsp.d/ +client/init-ltsp.d/Ubuntu/* usr/share/ltsp/init-ltsp.d/ client/init-ltsp sbin client/initramfs/* usr/share/initramfs-tools/ client/initscripts/ltsp-bindmounts usr/share/ltsp client/initscripts/ltsp-init-common usr/share/ltsp client/jetpipe/jetpipe usr/sbin client/kioskSession usr/share/ltsp +client/ltsp-client-functions usr/share/ltsp client/ltsp_config.d/* usr/share/ltsp/ltsp_config.d/ client/ltsp_config usr/share/ltsp client/nbd-disconnect usr/share/ltsp @@ -29,6 +33,5 @@ localapps/ltsp-remoteappsd usr/sbin localapps/ltsp-remoteapps usr/bin localapps/src/xatomwait usr/bin -ltsp-common-functions usr/share/ltsp nbd-proxy/src/nbd-client-proxy usr/sbin nbd-proxy/src/nbd-proxy usr/sbin diff -Nru ltsp-5.3.6/debian/ltsp-server.install ltsp-5.3.7/debian/ltsp-server.install --- ltsp-5.3.6/debian/ltsp-server.install 2012-03-30 14:20:02.000000000 +0000 +++ ltsp-5.3.7/debian/ltsp-server.install 2012-04-02 20:07:25.000000000 +0000 @@ -1,8 +1,10 @@ debian/bugs/ltsp-server/* usr/share/bug/ltsp-server/ localapps/ltsp-localapps usr/bin -ltsp-common-functions usr/share/ltsp server/80_ltsp-sound /etc/X11/Xsession.d +server/functions/Debian/* usr/share/ltsp/ server/ltsp-build-client usr/sbin +server/ltsp-chroot usr/sbin/ +server/ltsp-server-functions usr/share/ltsp server/ltsp-info usr/bin server/ltsp-keys etc/network/if-up.d server/ltsp-update-image usr/sbin @@ -11,5 +13,4 @@ server/nbdrootd usr/sbin server/nbdswapd usr/sbin server/plugins/ usr/share/ltsp/ -server/scripts/debian/ltsp-chroot usr/sbin/ server/scripts/debian/* usr/share/ltsp/scripts/ diff -Nru ltsp-5.3.6/debian/patches/0001-cherry-pick-r2151-initscript-plymouth-fix.patch ltsp-5.3.7/debian/patches/0001-cherry-pick-r2151-initscript-plymouth-fix.patch --- ltsp-5.3.6/debian/patches/0001-cherry-pick-r2151-initscript-plymouth-fix.patch 2012-03-30 14:20:02.000000000 +0000 +++ ltsp-5.3.7/debian/patches/0001-cherry-pick-r2151-initscript-plymouth-fix.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -Description: Make sure we exit plymouth before running screen_session -Author: Stéphane Graber -Bug-Ubuntu: https://bugs.launchpad.net/bugs/966267 -Origin: upstream - ---- ltsp-5.3.6.orig/client/initscripts/ltsp-core.upstart -+++ ltsp-5.3.6/client/initscripts/ltsp-core.upstart -@@ -23,12 +23,12 @@ pre-start script - eval $(getltscfg-cluster -a -l boot) || true - fi - -- start_screen_sessions || true -- start_sound || true -- - if [ -x /bin/plymouth ]; then - /bin/plymouth quit --retain-splash || true - fi -+ -+ start_screen_sessions || true -+ start_sound || true - end script - - post-stop script ---- ltsp-5.3.6.orig/client/initscripts/ltsp-core -+++ ltsp-5.3.6/client/initscripts/ltsp-core -@@ -44,14 +44,14 @@ case "$1" in - eval $(getltscfg-cluster -a -l boot) || true - fi - -+ if [ -x /bin/plymouth ]; then -+ /bin/plymouth quit --retain-splash -+ fi -+ - start_screen_sessions || true - start_sound || true - - log_action_end_msg 0 -- -- if [ -x /bin/plymouth ]; then -- /bin/plymouth quit --retain-splash -- fi - ;; - stop) - # This means that an LTSP client is shutting down or rebooting. diff -Nru ltsp-5.3.6/debian/patches/series ltsp-5.3.7/debian/patches/series --- ltsp-5.3.6/debian/patches/series 2012-03-30 14:20:02.000000000 +0000 +++ ltsp-5.3.7/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -0001-cherry-pick-r2151-initscript-plymouth-fix.patch diff -Nru ltsp-5.3.6/debian/rules ltsp-5.3.7/debian/rules --- ltsp-5.3.6/debian/rules 2012-03-30 14:20:02.000000000 +0000 +++ ltsp-5.3.7/debian/rules 2012-04-02 19:49:12.000000000 +0000 @@ -61,6 +61,15 @@ cp $(CURDIR)/client/initscripts/ltsp-core $(CURDIR)/debian/ltsp-client-core.init cp $(CURDIR)/client/initscripts/ltsp-core.upstart $(CURDIR)/debian/ltsp-client-core.upstart + # Manually install the functions in the right packages + mkdir -p $(CURDIR)/debian/ltsp-client-core/usr/share/ltsp + mkdir -p $(CURDIR)/debian/ltsp-server/usr/share/ltsp + cp common/ltsp-common-functions $(CURDIR)/debian/ltsp-client-core/usr/share/ltsp/ltsp-client-common-functions + cp common/ltsp-common-functions $(CURDIR)/debian/ltsp-server/usr/share/ltsp/ltsp-server-common-functions + + # FIXME: Temporary until end of transition + cp common/ltsp-common-functions $(CURDIR)/debian/ltsp-client-core/usr/share/ltsp/ltsp-common-functions + # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. diff -Nru ltsp-5.3.6/localapps/ldm-rc.d/X02-genmenu ltsp-5.3.7/localapps/ldm-rc.d/X02-genmenu --- ltsp-5.3.6/localapps/ldm-rc.d/X02-genmenu 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/localapps/ldm-rc.d/X02-genmenu 2012-04-03 18:39:07.000000000 +0000 @@ -1,6 +1,6 @@ # Create tmpdir for localapps menu if [ -x "/usr/bin/ltsp-genmenu" ]; then - if boolean_is_true "$LOCAL_APPS_MENU" && ! boolean_is_true "$LTSP_FATCLIENT"; then + if boolean_is_true "${LOCAL_APPS:-True}" && boolean_is_true "$LOCAL_APPS_MENU" && ! boolean_is_true "$LTSP_FATCLIENT"; then # get a temporary directory on the server TMP_XDG_MENU="$(ssh -S ${LDM_SOCKET} ${LDM_SERVER} mktemp -d /tmp/ltsp-localapps-${LDM_USERNAME}-XXXXXX)" export TMP_XDG_MENU diff -Nru ltsp-5.3.6/localapps/ltsp-localappsd ltsp-5.3.7/localapps/ltsp-localappsd --- ltsp-5.3.6/localapps/ltsp-localappsd 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/localapps/ltsp-localappsd 2012-04-03 18:39:07.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh -. /usr/share/ltsp/ltsp-common-functions +. /usr/share/ltsp/ltsp-client-functions logit() { logger -t ltsp-localappsd -p daemon.info $1 diff -Nru ltsp-5.3.6/ltsp-common-functions ltsp-5.3.7/ltsp-common-functions --- ltsp-5.3.6/ltsp-common-functions 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/ltsp-common-functions 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -# Common functions shared by LTSP scripts - -die() { - echo "$@" >&2 - exit 1 -} - -boolean_is_true(){ - case $1 in - # match all cases of true|y|yes - [Tt][Rr][Uu][Ee]|[Yy]|[Yy][Ee][Ss]) return 0 ;; - *) return 1 ;; - esac -} - -# list files in a directory consisting only of alphanumerics, hyphens and -# underscores -# $1 - directory to list -# $2 - optional prefix to limit which files are selected -run_parts_list() { - test $# -ge 1 || die "ERROR: Usage: run_parts_list " - if [ -d "$1" ]; then - find -L "$1" -mindepth 1 -maxdepth 1 -type f -name "$2*" | - sed -n '/.*\/[0-9a-zA-Z_\-]\{1,\}$/p' | sort -n - fi -} - -detect_vendor() { - if [ -e /etc/sysconfig/ltspdist ]; then - . /etc/sysconfig/ltspdist - echo "$VENDORDEF" - else - echo $(lsb_release --id --short | tr " " "_") - fi -} - -require_root() -{ - if [ ${UID:-$(id -u)} -ne 0 ]; then - die "Superuser privileges are needed." - fi -} - -# Remember mounted dirs so that it's easier to unmount them with a single call -# to umount_marked. They'll be unmounted in reverse order. -# Use the normal mount syntax, e.g. -# mark_mount -t proc proc "$ROOT/proc" -mark_mount() { - local dir - - # The last parameter is the dir we need to remember to unmount - dir=$(eval "echo \$$#") - if mount "$@"; then - # Use newlines to separate dirs, in case they contain spaces - if [ -z "$MARKED_MOUNTS" ]; then - MARKED_MOUNTS="$dir" - else - MARKED_MOUNTS="$dir -$MARKED_MOUNTS" - fi - else - die "Could not mount $dir." - fi -} - -umount_marked() { - [ -z "$MARKED_MOUNTS" ] && return - - echo "$MARKED_MOUNTS" | while read dir; do - # binfmt_misc might need to be unmounted manually, see LP #534211 - if [ "$dir%/proc}" != "$dir" ] && - ( [ "$VENDOR" = "Debian" ] || [ "$VENDOR" = "Ubuntu" ] ) && - [ -d "$dir/sys/fs/binfmt_misc" ] && [ -f "$dir/mounts" ] && - grep -q "^binfmt_misc $dir/sys/fs/binfmt_misc" "$dir/mounts"; then - if ! umount "$dir/sys/fs/binfmt_misc"; then - echo "Couldn't unmount $dir/sys/fs/binfmt_misc." >&2 - fi - fi - if ! umount "$dir"; then - echo "Couldn't unmount $dir." >&2 - fi - done -} - -if [ -f /usr/share/ltsp/ltsp-vendor-functions ]; then - . /usr/share/ltsp/ltsp-vendor-functions -fi diff -Nru ltsp-5.3.6/release.conf ltsp-5.3.7/release.conf --- ltsp-5.3.6/release.conf 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/release.conf 2012-04-03 18:39:07.000000000 +0000 @@ -1,3 +1,3 @@ NAME=ltsp -VERSION=5.3.6 +VERSION=5.3.7 EXPORTCHANGELOG=yes diff -Nru ltsp-5.3.6/server/configs/ALTLinux/ltsp-login.sh ltsp-5.3.7/server/configs/ALTLinux/ltsp-login.sh --- ltsp-5.3.6/server/configs/ALTLinux/ltsp-login.sh 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/server/configs/ALTLinux/ltsp-login.sh 2012-04-03 18:39:07.000000000 +0000 @@ -10,7 +10,7 @@ DIALOG= TIMEOUT=30 -. /usr/share/ltsp/ltsp-common-functions +. /usr/share/ltsp/ltsp-server-functions UVer() { diff -Nru ltsp-5.3.6/server/functions/Debian/ltsp-chroot-functions ltsp-5.3.7/server/functions/Debian/ltsp-chroot-functions --- ltsp-5.3.6/server/functions/Debian/ltsp-chroot-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/functions/Debian/ltsp-chroot-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,5 @@ +# Debian-specific function overrides for ltsp-chroot + +mount_package_cache() { + mark_mount --bind /var/cache/apt/archives "$ROOT/var/cache/apt/archives" +} diff -Nru ltsp-5.3.6/server/functions/Debian/ltsp-info-functions ltsp-5.3.7/server/functions/Debian/ltsp-info-functions --- ltsp-5.3.6/server/functions/Debian/ltsp-info-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/functions/Debian/ltsp-info-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,24 @@ +# Debian-specific function overrides for ltsp-info + +server_packages() { + echo server packages: + COLUMNS=200 dpkg -l 'ltsp*' 'ldm*' | awk '/ltsp|ldm/{print $1,$2,$3}' + echo +} + +chroot_packages() { + chroot=$1 + if [ -f $chroot/var/lib/dpkg/status ]; then + echo "packages in chroot: $chroot" + COLUMNS=200 dpkg --root=$chroot -l 'ltsp*' 'ldm*' | awk '/ltsp-client|ldm|ltspfs/{print $1,$2,$3}' + echo + fi +} + +chroot_release() { + if [ -x $chroot/usr/bin/lsb_release ]; then + echo "chroot information: $chroot" + ROOT=$chroot ltsp-chroot lsb_release --all + echo + fi +} diff -Nru ltsp-5.3.6/server/functions/Debian/ltsp-server-vendor-functions ltsp-5.3.7/server/functions/Debian/ltsp-server-vendor-functions --- ltsp-5.3.6/server/functions/Debian/ltsp-server-vendor-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/functions/Debian/ltsp-server-vendor-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,27 @@ +# Debian-specific function overrides for the common functions + +detect_arch() { + if [ -x /usr/bin/dpkg ]; then + echo $(dpkg --print-architecture) + else + echo "i386" + fi +} + +umount_marked() { + [ -z "$MARKED_MOUNTS" ] && return + + echo "$MARKED_MOUNTS" | while read dir; do + # binfmt_misc might need to be unmounted manually, see LP #534211 + if [ "$dir%/proc}" != "$dir" ] && + [ -d "$dir/sys/fs/binfmt_misc" ] && [ -f "$dir/mounts" ] && + grep -q "^binfmt_misc $dir/sys/fs/binfmt_misc" "$dir/mounts"; then + if ! umount "$dir/sys/fs/binfmt_misc"; then + echo "Couldn't unmount $dir/sys/fs/binfmt_misc." >&2 + fi + fi + if ! umount "$dir"; then + echo "Couldn't unmount $dir." >&2 + fi + done +} diff -Nru ltsp-5.3.6/server/functions/Fedora/ltsp-server-vendor-functions ltsp-5.3.7/server/functions/Fedora/ltsp-server-vendor-functions --- ltsp-5.3.6/server/functions/Fedora/ltsp-server-vendor-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/functions/Fedora/ltsp-server-vendor-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,5 @@ +# Fedora-specific function overrides for the common functions + +detect_arch() { + echo $(uname -m | sed -e s/i.86/i386/) +} diff -Nru ltsp-5.3.6/server/functions/Gentoo/ltsp-chroot-functions ltsp-5.3.7/server/functions/Gentoo/ltsp-chroot-functions --- ltsp-5.3.6/server/functions/Gentoo/ltsp-chroot-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/functions/Gentoo/ltsp-chroot-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,8 @@ +# Gentoo-specific function overrides for ltsp-chroot + +mount_package_cache() { + mark_mount --bind /usr/portage "$ROOT/usr/portage" + mark_mount --bind "/usr/portage/packages/${ARCH}" "$ROOT/usr/portage/packages" + # remove if ltsp ever in portage tree + mark_mount --bind "/var/lib/layman" "$ROOT/var/lib/layman" +} diff -Nru ltsp-5.3.6/server/functions/Gentoo/ltsp-info-functions ltsp-5.3.7/server/functions/Gentoo/ltsp-info-functions --- ltsp-5.3.6/server/functions/Gentoo/ltsp-info-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/functions/Gentoo/ltsp-info-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,36 @@ +# Local functions + +packages() { + chroot=$1 + pkgdir="$chroot/var/db/pkg" + for dir in $pkgdir/net-misc/ltsp* $pkgdir/*/ldm* $pkgdir/sys-fs/ltspfs-*; do + if [ -f "$dir/PF" ]; then + cat "$dir/PF" + fi + done +} + +# Gentoo-specific function overrides for ltsp-info + +server_packages() { + echo server packages: + packages + echo +} + +chroot_packages() { + chroot=$1 + if [ -d $chroot/var/db/pkg ]; then + echo "packages in chroot: $chroot" + packages $chroot + echo + fi +} + +chroot_release() { + if [ -x $chroot/usr/bin/lsb_release ]; then + echo "chroot information: $chroot" + ROOT=$chroot ltsp-chroot lsb_release --all + echo + fi +} diff -Nru ltsp-5.3.6/server/functions/Gentoo/ltsp-server-vendor-functions ltsp-5.3.7/server/functions/Gentoo/ltsp-server-vendor-functions --- ltsp-5.3.6/server/functions/Gentoo/ltsp-server-vendor-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/functions/Gentoo/ltsp-server-vendor-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,5 @@ +# Gentoo-specific function overrides for the common functions + +detect_arch() { + echo $(uname -m | sed -e 's:x86_64:amd64:' -e 's:parisc:hppa:') +} diff -Nru ltsp-5.3.6/server/functions/Gentoo/ltsp-update-kernels-functions ltsp-5.3.7/server/functions/Gentoo/ltsp-update-kernels-functions --- ltsp-5.3.6/server/functions/Gentoo/ltsp-update-kernels-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/functions/Gentoo/ltsp-update-kernels-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,17 @@ +# Gentoo-specific function overrides for ltsp-update-kernels + +cleanup_kernels() { + for kernelpath in $(find $TFTPBOOT/$CHROOT_NAME -name 'kernel-genkernel*'); do + kernel=`basename $kernelpath` + archversion=${kernel##kernel-genkernel-} + arch=$(echo $archversion | awk -F "-" '{print $1}') + version=$(echo $archversion | sed s/$arch-//) + + if [ ! -d $BASE/$CHROOT_NAME/lib/modules/$version ]; then + echo "Removing $kernelpath" + rm -f $TFTPBOOT/$CHROOT_NAME/kernel-genkernel-$arch-$version + rm -f $TFTPBOOT/$CHROOT_NAME/initramfs-genkernel-$arch-$version + rm -f $TFTPBOOT/$CHROOT_NAME/System.map-genkernel-$arch-$version + fi + done +} diff -Nru ltsp-5.3.6/server/functions/SUSE_LINUX/ltsp-server-vendor-functions ltsp-5.3.7/server/functions/SUSE_LINUX/ltsp-server-vendor-functions --- ltsp-5.3.6/server/functions/SUSE_LINUX/ltsp-server-vendor-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/functions/SUSE_LINUX/ltsp-server-vendor-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,5 @@ +# SUSE_LINUX-specific function overrides for the common functions + +detect_arch() { + echo $(uname -m | sed -e s/i.86/i386/ -e s/ppc.*/powerpc/) +} diff -Nru ltsp-5.3.6/server/ltsp-build-client ltsp-5.3.7/server/ltsp-build-client --- ltsp-5.3.6/server/ltsp-build-client 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/server/ltsp-build-client 2012-04-03 18:39:07.000000000 +0000 @@ -33,8 +33,8 @@ set -e -# Source the ltsp common functions for vendor detect -. /usr/share/ltsp/ltsp-common-functions +# Source the ltsp server functions for vendor detect +. /usr/share/ltsp/ltsp-server-functions export TERM=linux # make sure we're using a known terminal type export TEXTDOMAIN=ltsp # gettext domain (.mo file name) diff -Nru ltsp-5.3.6/server/ltsp-chroot ltsp-5.3.7/server/ltsp-chroot --- ltsp-5.3.6/server/ltsp-chroot 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/ltsp-chroot 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,136 @@ +#!/bin/sh + +# copyright 2009 Vagrant Cascadian , +# 2010 Alkis Georgopoulos , +# 2011 Wim Muskee , distributed under the +# terms of the GNU General Public License version 2 or any later version. + +# generic functions + +usage() { +cat < +# 2012, Alkis Georgopoulos # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -18,13 +19,6 @@ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # MA 02110-1301, USA. -# Source the ltsp common functions for vendor detect -. /usr/share/ltsp/ltsp-common-functions - -VENDOR=$(detect_vendor) # Linux distribution -export BASE=${BASE:-/opt/ltsp} # LTSP base directory - - # generic functions find_chroots() { find $BASE -mindepth 1 -maxdepth 1 -type d @@ -58,7 +52,8 @@ fi } -lsb_server_info() { +# Distros may override that if they don't support lsb_release +server_info() { echo server information: lsb_release --all echo @@ -66,50 +61,22 @@ # distro specific functions -Debian_server_packages() { - echo server packages: - COLUMNS=200 dpkg -l 'ltsp*' 'ldm*' | awk '/ltsp|ldm/{print $1,$2,$3}' - echo +server_packages() { + die "Your distro needs to implement function server_packages in order to support $0." } -Debian_chroot_packages() { - chroot=$1 - if [ -f $chroot/var/lib/dpkg/status ]; then - echo "packages in chroot: $chroot" - COLUMNS=200 dpkg --root=$chroot -l 'ltsp*' 'ldm*' | awk '/ltsp-client|ldm|ltspfs/{print $1,$2,$3}' - echo - fi +chroot_packages() { + die "Your distro needs to implement function chroot_packages in order to support $0." } -Debian_chroot_release() { - if [ -x $chroot/usr/bin/lsb_release ]; then - echo "chroot information: $chroot" - ROOT=$chroot ltsp-chroot lsb_release --all - echo - fi -} - -Gentoo_server_packages() { - echo server packages: - Gentoo_packages - echo +chroot_release() { + die "Your distro needs to implement function chroot_release in order to support $0." } -Gentoo_packages() { - chroot=$1 - cat $chroot/var/db/pkg/net-misc/ltsp*/PF - cat $chroot/var/db/pkg/sys-fs/ltspfs-*/PF - cat $chroot/var/db/pkg/*/ldm*/PF -} +# ltsp-server-functions also sources distro specific function overrides +. /usr/share/ltsp/ltsp-server-functions -Gentoo_chroot_packages() { - chroot=$1 - if [ -d $chroot/var/db/pkg ]; then - echo "packages in chroot: $chroot" - Gentoo_packages $chroot - echo - fi -} +export BASE=${BASE:-/opt/ltsp} # LTSP base directory for opt in $@ ; do case $opt in @@ -118,61 +85,16 @@ esac done -case $VENDOR in - Debian|Ubuntu) - if [ "$server_info" != "false" ]; then - lsb_server_info - Debian_server_packages - fi - for chroot in $(find_chroots) ; do - chroot_name=$(basename $chroot) - if [ "$verbose" = "true" ]; then - Debian_chroot_release - fi - Debian_chroot_packages $chroot - find_lts_conf $chroot - done - find_images - ;; - Gentoo) - if [ "$server_info" != "false" ]; then - lsb_server_info - Gentoo_server_packages - fi - for chroot in $(find_chroots) ; do - chroot_name=$(basename $chroot) - Gentoo_chroot_packages $chroot - find_lts_conf $chroot - done - find_images - ;; - SUSE_LINUX) - if [ x"$USER" != x"root" ]; then - echo "You have to be root to run this script" - exit 1 - fi - echo "-------------------------------------------------------------" - echo "Please paste the following information on http://pastebin.com" - echo "post the resulting link to the mailing list or IRC channel" - echo "-------------------------------------------------------------" - echo "LSB information:" - lsb_release --all - echo "Package information:" - rpm -qa "*kiwi*" - rpm -qa "*ltsp*" - rpm -qa "*ldm*" - echo "Network information:" - ip addr - echo "kiwi-ltsp configuration:" - cat /etc/sysconfig/kiwi-ltsp | grep -v \# - kiwi-ltsp-setup -c || true - echo "DHCPD configuration:" - cat /etc/dhcpd.conf | grep -v \# - echo "contents of lts.conf:" - cat /srv/tftpboot/KIWI/lts.conf | grep -v \# - echo "pxelinux.cfg/default contents:" - cat /srv/tftpboot/pxelinux.cfg/default - echo "kiwi's config.default:" - cat /srv/tftpboot/KIWI/config.default - ;; -esac +if [ "$server_info" != "false" ]; then + server_info + server_packages +fi +for chroot in $(find_chroots) ; do + chroot_name=$(basename $chroot) + if [ "$verbose" = "true" ]; then + chroot_release + fi + chroot_packages $chroot + find_lts_conf $chroot +done +find_images diff -Nru ltsp-5.3.6/server/ltsp-info-SUSE_LINUX ltsp-5.3.7/server/ltsp-info-SUSE_LINUX --- ltsp-5.3.6/server/ltsp-info-SUSE_LINUX 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/ltsp-info-SUSE_LINUX 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +if [ x"$USER" != x"root" ]; then + echo "You have to be root to run this script" + exit 1 +fi +echo "-------------------------------------------------------------" +echo "Please paste the following information on http://pastebin.com" +echo "post the resulting link to the mailing list or IRC channel" +echo "-------------------------------------------------------------" +echo "LSB information:" +lsb_release --all +echo "Package information:" +rpm -qa "*kiwi*" +rpm -qa "*ltsp*" +rpm -qa "*ldm*" +echo "Network information:" +ip addr +echo "kiwi-ltsp configuration:" +cat /etc/sysconfig/kiwi-ltsp | grep -v \# +kiwi-ltsp-setup -c || true +echo "DHCPD configuration:" +cat /etc/dhcpd.conf | grep -v \# +echo "contents of lts.conf:" +cat /srv/tftpboot/KIWI/lts.conf | grep -v \# +echo "pxelinux.cfg/default contents:" +cat /srv/tftpboot/pxelinux.cfg/default +echo "kiwi's config.default:" +cat /srv/tftpboot/KIWI/config.default diff -Nru ltsp-5.3.6/server/ltsp-server-common-functions ltsp-5.3.7/server/ltsp-server-common-functions --- ltsp-5.3.6/server/ltsp-server-common-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/ltsp-server-common-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,89 @@ +# Common functions shared by LTSP scripts + +die() { + echo "$@" >&2 + exit 1 +} + +boolean_is_true(){ + case $1 in + # match all cases of true|y|yes + [Tt][Rr][Uu][Ee]|[Yy]|[Yy][Ee][Ss]) return 0 ;; + *) return 1 ;; + esac +} + +# list files in a directory consisting only of alphanumerics, hyphens and +# underscores +# $1 - directory to list +# $2 - optional prefix to limit which files are selected +run_parts_list() { + test $# -ge 1 || die "ERROR: Usage: run_parts_list " + if [ -d "$1" ]; then + find -L "$1" -mindepth 1 -maxdepth 1 -type f -name "$2*" | + sed -n '/.*\/[0-9a-zA-Z_\-]\{1,\}$/p' | sort -n + fi +} + +detect_vendor() { + if [ -e /etc/sysconfig/ltspdist ]; then + . /etc/sysconfig/ltspdist + echo "$VENDORDEF" + else + echo $(lsb_release --id --short | tr " " "_") + fi +} + +# Distros may override this function to implement their own +# architecture detection. +detect_arch() { + echo $(uname -m) +} + +require_root() +{ + if [ ${UID:-$(id -u)} -ne 0 ]; then + die "Superuser privileges are needed." + fi +} + +# Remember mounted dirs so that it's easier to unmount them with a single call +# to umount_marked. They'll be unmounted in reverse order. +# Use the normal mount syntax, e.g. +# mark_mount -t proc proc "$ROOT/proc" +mark_mount() { + local dir + + # The last parameter is the dir we need to remember to unmount + dir=$(eval "echo \$$#") + if mount "$@"; then + # Use newlines to separate dirs, in case they contain spaces + if [ -z "$MARKED_MOUNTS" ]; then + MARKED_MOUNTS="$dir" + else + MARKED_MOUNTS="$dir +$MARKED_MOUNTS" + fi + else + die "Could not mount $dir." + fi +} + +umount_marked() { + [ -z "$MARKED_MOUNTS" ] && return + + echo "$MARKED_MOUNTS" | while read dir; do + if ! umount "$dir"; then + echo "Couldn't unmount $dir." >&2 + fi + done +} + +# Source tool-specific functions, if they're provided. +# Recursive inclusions shouldn't ever happen, but let's prevent them anyway. +if [ -z "$ltsp_tool" ]; then + ltsp_tool=${0##*/} + if [ -f "/usr/share/ltsp/$ltsp_tool-functions" ]; then + . "/usr/share/ltsp/$ltsp_tool-functions" + fi +fi diff -Nru ltsp-5.3.6/server/ltsp-server-functions ltsp-5.3.7/server/ltsp-server-functions --- ltsp-5.3.6/server/ltsp-server-functions 1970-01-01 00:00:00.000000000 +0000 +++ ltsp-5.3.7/server/ltsp-server-functions 2012-04-03 18:39:07.000000000 +0000 @@ -0,0 +1,9 @@ +# Common functions shared by LTSP scripts +if [ -f /usr/share/ltsp/ltsp-server-common-functions ]; then + . /usr/share/ltsp/ltsp-server-common-functions +fi + +# Sourcing distro specific overrides. +if [ -f /usr/share/ltsp/ltsp-server-vendor-functions ]; then + . /usr/share/ltsp/ltsp-server-vendor-functions +fi diff -Nru ltsp-5.3.6/server/ltsp-update-kernels ltsp-5.3.7/server/ltsp-update-kernels --- ltsp-5.3.6/server/ltsp-update-kernels 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/server/ltsp-update-kernels 2012-04-03 18:39:07.000000000 +0000 @@ -46,6 +46,42 @@ EOF } +# distro specific functions + +# Find $version from vmlinuz-* filename, +# if corresponding /opt/ltsp/$CHROOT_NAME/lib/modules/$version is +# missing, then delete kernel and images from tftpboot directory. +# +# Some distros won't match vmlinuz-*, but this is at least safe +# because it will simply cleanup nothing. +cleanup_kernels() { + # Loop through every vmlinuz-* file + for kernelpath in $(find $TFTPBOOT/$CHROOT_NAME -name 'vmlinuz-*'); do + kernel=`basename $kernelpath` + version=${kernel##vmlinuz-} + if [ ! -d $BASE/$CHROOT_NAME/lib/modules/$version ]; then + echo "Removing $kernelpath" + # Common + rm -f $TFTPBOOT/$CHROOT_NAME/vmlinuz-$version + rm -f $TFTPBOOT/$CHROOT_NAME/config-$version + rm -f $TFTPBOOT/$CHROOT_NAME/System.map-$version + # Fedora + rm -f $TFTPBOOT/$CHROOT_NAME/initrd-$version.img + rm -f $TFTPBOOT/$CHROOT_NAME/initramfs-$version.img + rm -f $TFTPBOOT/$CHROOT_NAME/elf-$version.img + rm -f $TFTPBOOT/$CHROOT_NAME/wraplinux-nbi-$version.img + rm -f $TFTPBOOT/$CHROOT_NAME/aout-$version.img + rm -f $TFTPBOOT/$CHROOT_NAME/symvers-$version.gz + # Debian + rm -f $TFTPBOOT/$CHROOT_NAME/initrd.img-$version + rm -f $TFTPBOOT/$CHROOT_NAME/nbi.img-$version + # Ubuntu + rm -f $TFTPBOOT/$CHROOT_NAME/abi-$version + rm -f $TFTPBOOT/$CHROOT_NAME/vmcoreinfo-$version + fi + done +} + # # Handle args # @@ -69,6 +105,9 @@ esac done +# ltsp-server-functions also sources distro specific function overrides +. /usr/share/ltsp/ltsp-server-functions + if [ -f /etc/ltsp/ltsp-update-kernels.conf ]; then . /etc/ltsp/ltsp-update-kernels.conf fi @@ -123,39 +162,8 @@ fi fi - ### Cleanup old kernels and images from tftpboot directory ### - # Find $version from vmlinuz-* filename, - # if corresponding /opt/ltsp/$CHROOT_NAME/lib/modules/$version is - # missing, then delete kernel and images from tftpboot directory. - # - # Some distros won't match vmlinuz-*, but this is at least safe - # because it will simply cleanup nothing. - - # Loop through every vmlinuz-* file - for kernelpath in $(find $TFTPBOOT/$CHROOT_NAME -name 'vmlinuz-*'); do - kernel=`basename $kernelpath` - version=${kernel##vmlinuz-} - if [ ! -d $BASE/$CHROOT_NAME/lib/modules/$version ]; then - echo "Removing $kernelpath" - # Common - rm -f $TFTPBOOT/$CHROOT_NAME/vmlinuz-$version - rm -f $TFTPBOOT/$CHROOT_NAME/config-$version - rm -f $TFTPBOOT/$CHROOT_NAME/System.map-$version - # Fedora - rm -f $TFTPBOOT/$CHROOT_NAME/initrd-$version.img - rm -f $TFTPBOOT/$CHROOT_NAME/initramfs-$version.img - rm -f $TFTPBOOT/$CHROOT_NAME/elf-$version.img - rm -f $TFTPBOOT/$CHROOT_NAME/wraplinux-nbi-$version.img - rm -f $TFTPBOOT/$CHROOT_NAME/aout-$version.img - rm -f $TFTPBOOT/$CHROOT_NAME/symvers-$version.gz - # Debian - rm -f $TFTPBOOT/$CHROOT_NAME/initrd.img-$version - rm -f $TFTPBOOT/$CHROOT_NAME/nbi.img-$version - # Ubuntu - rm -f $TFTPBOOT/$CHROOT_NAME/abi-$version - rm -f $TFTPBOOT/$CHROOT_NAME/vmcoreinfo-$version - fi - done + # Cleanup old kernels and images from tftpboot directory + cleanup_kernels done # Update selinux file contexts if necessary [ -f /selinux/enforce ] && /sbin/restorecon -R $TFTPDIR > /dev/null diff -Nru ltsp-5.3.6/server/plugins/functions ltsp-5.3.7/server/plugins/functions --- ltsp-5.3.6/server/plugins/functions 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/server/plugins/functions 2012-04-03 18:39:07.000000000 +0000 @@ -2,7 +2,7 @@ ### Methods to be called by plugins ################################## -. /usr/share/ltsp/ltsp-common-functions +. /usr/share/ltsp/ltsp-server-functions # Load plugins. # diff -Nru ltsp-5.3.6/server/plugins/ltsp-build-client/common/010-chroot-tagging ltsp-5.3.7/server/plugins/ltsp-build-client/common/010-chroot-tagging --- ltsp-5.3.6/server/plugins/ltsp-build-client/common/010-chroot-tagging 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/server/plugins/ltsp-build-client/common/010-chroot-tagging 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -case "$MODE" in - after-install) - echo LTSP_CHROOT=$ROOT >> $ROOT/etc/ltsp_chroot - ;; -esac diff -Nru ltsp-5.3.6/server/plugins/ltsp-build-client/SUSE_LINUX/010-chroot-tagging ltsp-5.3.7/server/plugins/ltsp-build-client/SUSE_LINUX/010-chroot-tagging --- ltsp-5.3.6/server/plugins/ltsp-build-client/SUSE_LINUX/010-chroot-tagging 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/server/plugins/ltsp-build-client/SUSE_LINUX/010-chroot-tagging 2012-04-03 18:39:07.000000000 +0000 @@ -1 +1,3 @@ #This is set by rpm package that is installed in the chroot +#for the Suse maintainer: +#the 010-chroot-tagging plugin is removed from common, this can be removed safely diff -Nru ltsp-5.3.6/server/plugins/ltsp-build-client/Ubuntu/025-locales ltsp-5.3.7/server/plugins/ltsp-build-client/Ubuntu/025-locales --- ltsp-5.3.6/server/plugins/ltsp-build-client/Ubuntu/025-locales 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/server/plugins/ltsp-build-client/Ubuntu/025-locales 2012-04-03 18:39:07.000000000 +0000 @@ -30,8 +30,10 @@ fi export LANG="$LOCALE" - if [ -f /etc/default/console-setup ]; then - cp /etc/default/console-setup $ROOT/etc/default/console-setup - fi + for f in /etc/default/console-setup /etc/default/keyboard; do + if [ -f "$f" ]; then + cp "$f" "$ROOT/$f" + fi + done ;; esac diff -Nru ltsp-5.3.6/server/scripts/debian/ltsp-chroot ltsp-5.3.7/server/scripts/debian/ltsp-chroot --- ltsp-5.3.6/server/scripts/debian/ltsp-chroot 2012-03-22 19:25:15.000000000 +0000 +++ ltsp-5.3.7/server/scripts/debian/ltsp-chroot 1970-01-01 00:00:00.000000000 +0000 @@ -1,154 +0,0 @@ -#!/bin/sh - -# copyright 2009 Vagrant Cascadian , -# 2010 Alkis Georgopoulos , -# 2011 Wim Muskee , distributed under the -# terms of the GNU General Public License version 2 or any later version. - -usage() { -cat <