diff options
| -rw-r--r-- | doc/setup_howto | 13 | ||||
| -rwxr-xr-x | remote/modules/kdm/data/etc/kde4/kdm/Xreset | 6 | ||||
| -rwxr-xr-x | remote/modules/kdm/data/etc/kde4/kdm/Xsession | 3 | ||||
| -rwxr-xr-x | remote/modules/kdm/data/etc/kde4/kdm/Xsetup | 3 | ||||
| -rwxr-xr-x | remote/modules/kdm/data/etc/kde4/kdm/Xstartup | 4 | ||||
| -rwxr-xr-x | remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close | 4 | ||||
| -rwxr-xr-x | remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open | 12 | ||||
| -rwxr-xr-x | remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt | 4 | ||||
| -rw-r--r-- | remote/modules/vmware/data/etc/X11/Xreset.d/vmware | 2 | ||||
| -rwxr-xr-x | remote/modules/xorg/data/etc/X11/Xreset | 24 | ||||
| -rwxr-xr-x[-rw-r--r--] | remote/modules/xorg/data/etc/X11/Xsession | 8 | ||||
| -rw-r--r-- | remote/rootfs/rootfs-stage32/rootfs-stage32.conf | 1 | ||||
| -rw-r--r-- | server/blacklists/essential/x11 | 3 | ||||
| -rw-r--r-- | server/blacklists/vmware/vmplayer | 4 | ||||
| -rw-r--r-- | server/blacklists/vmware/vmtools (renamed from server/blacklists/quickfix/vmware-tools) | 1 |
15 files changed, 72 insertions, 20 deletions
diff --git a/doc/setup_howto b/doc/setup_howto index 5d516ea9..29056829 100644 --- a/doc/setup_howto +++ b/doc/setup_howto @@ -19,7 +19,9 @@ scripts, as e.g. needed packages will be installed automatically. 2. Source repositories openSLX main repository: git://git.openslx.org/openslx-ng/tm-scripts.git -printerGUI repository: git://git.openslx.org/openslx-ng/printergui.git + +There are some other git repositories needed by the build process, but they +will be automatically checked out, e.g. busybox or printergui. 3. Server prerequisites @@ -31,7 +33,9 @@ Needed services: dhcp, tftpd, httpd, NFS and/or dnbd3. checkout openSLX git repository: # git clone git://git.openslx.org/openslx-ng/tm-scripts.git -# git clone git://git.openslx.org/openslx-ng/printergui.git + +There are some other git repositories needed by the build process, but they +are automatically checked out, e.g. busybox or printergui. 5. Getting started @@ -208,8 +212,9 @@ localizations may be listed at [path to tm-scripts]/server/configs. 10. iPXE: TODO -## most probably not required as relevant features are available in recent -## Syslinux versions (6.0.0+) +This will be most probably not being required in the future, as relevant +features are available in recent Syslinux versions (6.0.0+). + 11. Stage 4 (extract Linux desktop environment) diff --git a/remote/modules/kdm/data/etc/kde4/kdm/Xreset b/remote/modules/kdm/data/etc/kde4/kdm/Xreset index e6782a43..64194a64 100755 --- a/remote/modules/kdm/data/etc/kde4/kdm/Xreset +++ b/remote/modules/kdm/data/etc/kde4/kdm/Xreset @@ -1,5 +1,7 @@ -#! /bin/sh +#! /bin/ash # Xreset - run as root after session exits +# +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" # Reassign ownership of the console to root, this should disallow # assignment of console output to any random users's xterm. See Xstartup. @@ -12,4 +14,4 @@ # Use common Xreset framework if it exist if [ -x /etc/X11/Xreset ] ; then /etc/X11/Xreset -fi
\ No newline at end of file +fi diff --git a/remote/modules/kdm/data/etc/kde4/kdm/Xsession b/remote/modules/kdm/data/etc/kde4/kdm/Xsession index edff71a3..79d3a06d 100755 --- a/remote/modules/kdm/data/etc/kde4/kdm/Xsession +++ b/remote/modules/kdm/data/etc/kde4/kdm/Xsession @@ -1,5 +1,6 @@ -#! /bin/sh +#! /bin/ash # Xsession - run as user +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" session=$1 diff --git a/remote/modules/kdm/data/etc/kde4/kdm/Xsetup b/remote/modules/kdm/data/etc/kde4/kdm/Xsetup index a31d61e4..965f1f08 100755 --- a/remote/modules/kdm/data/etc/kde4/kdm/Xsetup +++ b/remote/modules/kdm/data/etc/kde4/kdm/Xsetup @@ -1,5 +1,6 @@ -#! /bin/sh +#! /bin/ash # Xsetup - run as root before the login dialog appears +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" #xconsole -geometry 480x130-0-0 -notify -verbose -fn fixed -exitOnFail -file /dev/xconsole & diff --git a/remote/modules/kdm/data/etc/kde4/kdm/Xstartup b/remote/modules/kdm/data/etc/kde4/kdm/Xstartup index c5439011..5ca1683b 100755 --- a/remote/modules/kdm/data/etc/kde4/kdm/Xstartup +++ b/remote/modules/kdm/data/etc/kde4/kdm/Xstartup @@ -1,7 +1,7 @@ -#! /bin/sh +#! /bin/ash # Xstartup - run as root before session starts -PATH="$PATH:/usr/bin/X11" +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" if [ -e /etc/nologin ]; then # always display the nologin message, if possible diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close index 7c533405..d3b5ebb3 100755 --- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close +++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close @@ -26,10 +26,10 @@ if [ "x${OPENSESSIONS}" == "x1" ]; then pkill -9 -u "${PAM_USER}" # unmount the home directory structure - umount "/home/${PAM_USER}/PERSISTENT" || \ + umount -l "/home/${PAM_USER}/PERSISTENT" || \ echo "Could not unmount '/home/${PAM_USER}/PERSISTENT'." - umount "/home/${PAM_USER}" || \ + umount -l "/home/${PAM_USER}" || \ echo "Could not unmount '/home/${PAM_USER}'." fi diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open index 63fb3413..8533f421 100755 --- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open +++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open @@ -19,8 +19,6 @@ mount | grep -q "$TEMP_HOME_DIR" && exit 0 # no home, lets create it mkdir -p "${TEMP_HOME_DIR}" || \ { slxlog "pam-global-mktemphome" "Could not create '${TEMP_HOME_DIR}'."; exit 1; } -chown -R "${PAM_USER}" "${TEMP_HOME_DIR}" || \ - { slxlog "pam-global-chtemphome" "Could not chown '${TEMP_HOME_DIR}' to ${PAM_USER}."; exit 1; } # now make it a tmpfs mount -t tmpfs -o size=100m tmpfs "${TEMP_HOME_DIR}" || \ @@ -43,9 +41,15 @@ cat > "${PERSISTENT_HOME_DIR}/WARNING.txt" << EOF Your home directory contents is unavailable. DO NOT SAVE ANYTHING HERE AS ALL WILL BE LOST UPON REBOOT! EOF +# Try to get the user's attention (probably unsuccessful anyways) +for ext in doc xls ppt odt; do + for fname in WARNING ACHTUNG ATTENTION; do + ln "${PERSISTENT_HOME_DIR}/WARNING.txt" "${PERSISTENT_HOME_DIR}/${fname}.${ext}" + done +done -chown -R "${PAM_USER}" "${PERSISTENT_HOME_DIR}" || \ - { slxlog "pam-global-chpersistent " "Could not chown '${PERSISTENT_HOME_DIR}' to '${PAM_USER}'."; exit 1; } +chown -R "${PAM_USER}" "${TEMP_HOME_DIR}" || \ + { slxlog "pam-global-chpersistent " "Could not chown '${TEMP_HOME_DIR}' to '${PAM_USER}'."; exit 1; } # now lets see if we have a persistent directory [ ! -e "${PERSISTENT_MOUNT_SCRIPT}" ] && exit 0 diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt index 7e2eb5c5..6b9c4f0f 100755 --- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt +++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt @@ -485,8 +485,8 @@ else fi if [ -z "$vm_diskfile" ]; then - new_vmpath=$(ls "${vmpath}.r"* | grep -E '\.r[0-9]+$' | sort --version-sort | tail -1) - [ -n "$new_vmpath" ] && vmpath="$new_vmpath" + new_vmpath=$(ls "${vmpath}.r"* | grep -E '\.r[0-9]+$' | grep -o -E '[0-9]+' | sort -n | tail -1) + [ -n "$new_vmpath" ] && vmpath="$vmpath$new_vmpath" vm_diskfile="$vmpath" fi diff --git a/remote/modules/vmware/data/etc/X11/Xreset.d/vmware b/remote/modules/vmware/data/etc/X11/Xreset.d/vmware index c453aafd..ee436292 100644 --- a/remote/modules/vmware/data/etc/X11/Xreset.d/vmware +++ b/remote/modules/vmware/data/etc/X11/Xreset.d/vmware @@ -4,7 +4,7 @@ VMWARE_TMP_DIRS="$(cat /proc/mounts | grep "/tmp/vmware-" | awk -F " " '{print $1}')" for DIR in $VMWARE_TMP_DIRS; do - umount -l $DIR || echo "could not unmount." + umount -l "$DIR" || echo "Could not unmount." done exit 0 diff --git a/remote/modules/xorg/data/etc/X11/Xreset b/remote/modules/xorg/data/etc/X11/Xreset new file mode 100755 index 00000000..a77cf2c0 --- /dev/null +++ b/remote/modules/xorg/data/etc/X11/Xreset @@ -0,0 +1,24 @@ +#!/bin/sh +# +# /etc/X11/Xreset +# +# global Xreset file -- for use by display managers + +# $Id: Xsession 967 2005-12-27 07:20:55Z dnusinow $ + +set -e + +PROGNAME=Xreset +SYSSESSIONDIR=/etc/X11/Xreset.d + +if [ ! -d "$SYSSESSIONDIR" ]; then + # Nothing to do, exiting + exit 0 +fi + +for SESSIONFILE in $SYSSESSIONDIR/*; do + . "$SESSIONFILE" || slxlog "xreset" "Xreset: Could not source $SESSIONFILE." "$SESSIONFILE" +done + +exit 0 + diff --git a/remote/modules/xorg/data/etc/X11/Xsession b/remote/modules/xorg/data/etc/X11/Xsession index 15867190..dc64cf77 100644..100755 --- a/remote/modules/xorg/data/etc/X11/Xsession +++ b/remote/modules/xorg/data/etc/X11/Xsession @@ -2,6 +2,14 @@ #Workaround to start Xsession. The original Xsession script includes error handling functionality and sources other scrips from the Xsession.d/ directory. +SESSIONDIR="/etc/X11/Xsession.d" + +if [ -d "$SESSIONDIR" ]; then + for file in $SESSIONDIR/*; do + . $file || slxlog "xsession" "Xsession: Could not source $file" "$file" + done +fi + #start selected session case "$1" in failsafe) diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf index 357d9fce..ab2ac4cc 100644 --- a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf +++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf @@ -11,6 +11,7 @@ REQUIRED_BINARIES=" login sulogin mount + umount mount.nfs4 umount.nfs4 mkfs.xfs diff --git a/server/blacklists/essential/x11 b/server/blacklists/essential/x11 new file mode 100644 index 00000000..9b487603 --- /dev/null +++ b/server/blacklists/essential/x11 @@ -0,0 +1,3 @@ +- /etc/X11 +- /etc/kde4/kdm + diff --git a/server/blacklists/vmware/vmplayer b/server/blacklists/vmware/vmplayer new file mode 100644 index 00000000..a4e487b5 --- /dev/null +++ b/server/blacklists/vmware/vmplayer @@ -0,0 +1,4 @@ +# don't use the vmware wrapper script to start the player +# as it won't work on our system. +- /usr/bin/vmplayer +- /usr/bin/vmware diff --git a/server/blacklists/quickfix/vmware-tools b/server/blacklists/vmware/vmtools index f6dd61cc..d53249a9 100644 --- a/server/blacklists/quickfix/vmware-tools +++ b/server/blacklists/vmware/vmtools @@ -1,3 +1,2 @@ # TODO: Make vmware-tools work properly in our system - /usr/lib/vmware-tools - |
