From 42afca10fa4df79e7dfd7ddfe4df21df82ac159c Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 3 Sep 2006 13:59:27 +0000 Subject: VMware environment: loopfile and mount will be placed in /etc/vmware now to avoid problems with nfs and unionfs. Cleanups in vmware-prep script. Introduced new debug level for script runtime calculation, see DebugLevel for further information. Code cleanups in major initramfs scripts, improved /tmp handling in hwautocfg and init ... Removed imgsrv variable (from machine-setup), just merged with the vmware variable (put the vmware image source here ...) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@352 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/bin/dhcpmkconfig | 16 +-- initrd/initrd-stuff/bin/hwautocfg | 17 ++- initrd/initrd-stuff/bin/screenres | 2 +- initrd/initrd-stuff/bin/servconfig | 57 ++++++---- initrd/initrd-stuff/etc/functions | 24 +++-- initrd/initrd-stuff/etc/vmware-prep | 148 +++++--------------------- initrd/initrd-stuff/init | 15 +-- initrd/mkdxsinitrd | 6 +- installer/default_files/dhcpd.conf | 3 +- installer/default_files/machine-setup.default | 3 +- vmware/runvmware | 4 +- vmware/winconfig | 15 +-- 12 files changed, 123 insertions(+), 187 deletions(-) diff --git a/initrd/initrd-stuff/bin/dhcpmkconfig b/initrd/initrd-stuff/bin/dhcpmkconfig index b2ef4e3a..ded4caaa 100755 --- a/initrd/initrd-stuff/bin/dhcpmkconfig +++ b/initrd/initrd-stuff/bin/dhcpmkconfig @@ -1,14 +1,14 @@ #!/bin/sh # -# Description: universal (distro independent) IP configuration writer for -# several dhcp clients. The result is written in unified form -# to the /etc/machine-setup file +# universal (distro independent) IP configuration writer for several dhcp +# clients used within OpenSLX initramfs. The result is written in unified +# form to the /etc/machine-setup file # -# Author(s): Dirk von Suchodoletz , 09-07-2006 -# Lars Mueller, 23-06-2006 -# Oliver Tappe, 23-06-2006 +# Dirk von Suchodoletz , 03-09-2006 +# Lars Mueller, 23-06-2006 +# Oliver Tappe, 23-06-2006 # -# Copyright: (c) 2006 - RZ Universitaet Freiburg +# (c) 2006 - RZ Universitaet Freiburg # client variable should be exported via calling function cfgfile="/tmp/confviadhcp" @@ -20,7 +20,7 @@ enabled\n# via kernel command line)." # heavy debugging output in level 3 and above ... and on 13 #FIXME: DEBUGLEVEL is not propagated to this file (at least for Ubuntu) [ -z "$DEBUGLEVEL" ] && DEBUGLEVEL=0 -[ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 10 -o $DEBUGLEVEL -eq 13 ] && \ +[ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 8 -o $DEBUGLEVEL -eq 13 ] && \ set -x case $0 in *dhcpcd*) diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index aeb8d5a5..03d078db 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -3,7 +3,7 @@ # universal (distro independent) hardware autoconfiguration script for # OpenSLX linux diskless clients, using hwconfig from knoppix as base tool # -# Dirk von Suchodoletz , 31-08-2006 +# Dirk von Suchodoletz , 03-09-2006 # # (c) 2003 - 2006 - RZ Universitaet Freiburg # (c) 2006 - OpenSLX.org @@ -218,8 +218,11 @@ done . /etc/sysconfig/config . /etc/distro-functions +# script run timer +[ $DEBUGLEVEL -eq 8 ] && echo "** HW setup started at $(sysup)" + # heavy debugging output in level 3 and above and specific for 11 -[ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 10 -o $DEBUGLEVEL -eq 11 ] && \ +[ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 8 -o $DEBUGLEVEL -eq 11 ] && \ set -x # set X11 configuration file @@ -405,8 +408,11 @@ for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \ for hdpartnr in $(cat /tmp/hd_part | \ sed -n -e "/ 44 /p"|sed -e "s/[[:space:]].*//") ; do # ext2fs_check_if_mount message supressed - ( mkfs.ext2 -Fq $hdpartnr 2>/dev/null; mount -n -o nocheck,noexec \ - $hdpartnr /mnt/tmp 2>/dev/null; + ( mkfs.ext2 -Fq $hdpartnr 2>/dev/null + umount /mnt/tmp 2>/dev/null + # if mounting of temp partion fails fall back to tmpfs on /tmp + mount -n -o nocheck,noexec $hdpartnr /mnt/tmp 2>/dev/null || \ + mount -n -t tmpfs none /mnt/tmp echo "$hdpartnr is mounted to /tmp" > /tmp/tmpready ) & echo -e "$hdpartnr\t/tmp\t\text2\t\tdefaults\t 0 0" >> /tmp/fstab part44=yes @@ -446,4 +452,7 @@ fi waitfor /tmp/xready 10000 cp /etc/xorg.conf ${D_XF86CONFFILE} +# script run timer +[ $DEBUGLEVEL -eq 8 ] && echo "** HW setup finished at $(sysup)" + echo "finished" > /tmp/hwcfg diff --git a/initrd/initrd-stuff/bin/screenres b/initrd/initrd-stuff/bin/screenres index 8518b22e..4a9f5fd9 100755 --- a/initrd/initrd-stuff/bin/screenres +++ b/initrd/initrd-stuff/bin/screenres @@ -28,7 +28,7 @@ [ -z "$DEBUGLEVEL" ] && DEBUGLEVEL=0 [ $DEBUGLEVEL -gt 1 ] && DEBUG="yes" # heavy debugging output in level 3 and above ... -[ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 10 -o $DEBUGLEVEL -eq 14 ] && set -x +[ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 8 -o $DEBUGLEVEL -eq 14 ] && set -x # Define some default output values if the script fails to find better values # Empty defaults, s.t. hwautocfg defines the defaults diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index d16f8d68..17ab8511 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -4,7 +4,7 @@ # diskless clients (executed in stage3 within initial ramfs). The file- # system is setup when servconfig starts # -# Dirk von Suchodoletz , 01-09-2006 +# Dirk von Suchodoletz , 03-09-2006 # Michael Janczyk , 31-05-2006 # Lars Mueller , 23-06-2006 # Oliver Tappe , 23-06-2006 @@ -25,8 +25,11 @@ # get location of logfile definition . /mnt/etc/${D_SYSCONFDIR}/logfile -# heavy debugging output in level 3 and above ... -[ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 10 -o $DEBUGLEVEL -eq 12 ] && \ +# script run timer +[ $DEBUGLEVEL -eq 8 ] && echo "** SW setup started at $(sysup)" + +# heavy debugging output in level 3 and below 8 ... +[ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 8 -o $DEBUGLEVEL -eq 12 ] && \ set -x ####################################################################### @@ -38,31 +41,13 @@ cp -a /etc/sysconfig/files/* /mnt 2>/dev/null & cat /etc/boot.local >> /mnt/etc/${D_BOOTLOCAL} } -# set greeting and add information on booted system (distro) -len=$(expr length $DISTRO) -dstr="$DISTRO)" -while [ $len -le 11 ] ; do - dstr="$dstr " - len=$(expr $len + 1) -done -echo " - WELCOME TO \n (\l) - _____ ______ ______ __ __ _______ __ __ __ - / _ | _ | ___| | | | | ____| | | | | | - | | | | |_| | |_ | | | | |___ | | / / - | | | | ___/| _| | | ____ | | | | - | |_| | | | |___| | | | ____| | |___ / / - _____/|__| |______|__| |__| |_______|______|__| |__| - - Diskless Workstation (v4.1/$dstr (c) -">/mnt/etc/issue - ####################################################################### # read and unify configuration options - default configuration file, # from dhcp, ldap ... # wait for the appearance of configuration from several sources cfgcomplete . /etc/machine-setup +[ $DEBUGLEVEL -eq 8 ] && echo "** Config info is complete at $(sysup)" # copy additional configuration and var files and directories # admins can place there files in /var/lib/openslx/config/... @@ -70,6 +55,30 @@ cfgcomplete # ... in the near future ... cp -a /rootfs/* /mnt 2>/dev/null +# set greeting and add information on booted system (distro) +len=$(expr length $DISTRO) +dstr="$DISTRO)" +while [ $len -le 16 ] ; do + dstr="$dstr " + len=$(expr $len + 1) +done +len=$(expr length $host_name) +while [ $len -le 30 ] ; do + space="$space " + len=$(expr $len + 1) +done +echo " + WELCOME TO $space \n (\l) + _____ ______ ______ __ __ _______ __ __ __ + / _ | _ | ___| | | | | ____| | | | | | + | | | | |_| | |_ | | | | |___ | | / / + | | | | ___/| _| | | ____ | | | | + | |_| | | | |___| | | | ____| | |___ / / + _____/|__| |______|__| |__| |_______|______|__| |__| + + Diskless Workstation (v4.1/$dstr (c) +">/mnt/etc/issue + ####################################################################### # vmware stuff first part: two scenarios # * VM images in /usr/share/vmware - then simply link @@ -332,6 +341,7 @@ fi # there might be the chance that we have a disk partition available, so # wait for completion of detection, setup process waitfor /tmp/tmpready 10000 +[ $DEBUGLEVEL -eq 8 ] && echo "** Setup of /tmp completed at $(sysup)" # create some directories and correct permissions tmpisdisk=$(sed -n '/\/tmp/p' /tmp/fstab 2>/dev/null) # if there is no local disk partition for /tmp then try to mount a rw @@ -487,5 +497,8 @@ DisplayManager.*.reset:\t\t/etc/X11/xdm/Xreset" \ esac fi +# script run timer +[ $DEBUGLEVEL -eq 8 ] && echo "** SW setup finished at $(sysup)" + # servconfig finished successfully echo "finished" > /tmp/svcfg diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 006ccb17..4ad7fe5c 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -2,7 +2,7 @@ # (included by init, hwautocfg, servconfig, ... within OpenSLX initial # ramfs) # -# Dirk von Suchodoletz , 31-08-2006 +# Dirk von Suchodoletz , 03-09-2006 # Felix Endres, 30-04-2006 # Tobias Maier # @@ -72,10 +72,11 @@ else LOGFILE="/dev/null" fi # if nonfatal error else fatal error message and shell if [ -n "$2" ] ; then - [ "$DEBUGLEVEL" -ge 1 ] && echo -e "${error_msg}${e_msg}${error_nfe}" \ - >> ${LOGFILE} - [ "$DEBUGLEVEL" -gt 1 ] && echo -e "${error_msg}${e_msg}${error_nfe}" - [ "$DEBUGLEVEL" -gt 2 ] && usleep 20 + [ "$DEBUGLEVEL" -ge 1 -a "$DEBUGLEVEL" != 8 ] && \ + echo -e "${error_msg}${e_msg}${error_nfe}" >> ${LOGFILE} + [ "$DEBUGLEVEL" -gt 1 -a "$DEBUGLEVEL" != 8 ] && \ + echo -e "${error_msg}${e_msg}${error_nfe}" + [ "$DEBUGLEVEL" -gt 2 -a "$DEBUGLEVEL" != 8 ] && usleep 20 else echo -e "${error_msg}${e_msg}${error_shell}" # load usb modules to have keyboard enabled - they might have to be @@ -91,6 +92,14 @@ else # } fi } +####################################################################### +# system uptime for performance analysis +sysup () { +uptime=$(sed -e "s, .*,,;s,\.,," /proc/uptime) +echo "${uptime} ms." +# if start times are kept, a summary of runtimes would be possible too +} + ####################################################################### # micro sleep - either busybox command or simply loop and delete 1 from @@ -322,7 +331,8 @@ case $dhcp in error "$error_pump" ;; ipconfig) - [ $DEBUGLEVEL -gt 1 ] && echo -e "# You are using ipconfig as dhcp \ + [ $DEBUGLEVEL -gt 1 -a "$DEBUGLEVEL" != 8 ] && \ +echo -e "# You are using ipconfig as dhcp \ client. With this tool you only get the\n# basic IP settings from the \ server. No vendor specific, self defined\n# dhcp options are possible this \ way. use dhclient instead or get them via\n# tftp (to be enabled via kernel \ @@ -370,7 +380,7 @@ esac # unpack part (only gzip is supported) if [ -s $dst ] ; then tar -xpzf $dst 2>/dev/null - [ "$DEBUGLEVEL" -le 2 ] && rm $dst + [ "$DEBUGLEVEL" -le 2 -o "$DEBUGLEVEL" -eq 8 ] && rm $dst return 0 else return 1 diff --git a/initrd/initrd-stuff/etc/vmware-prep b/initrd/initrd-stuff/etc/vmware-prep index 21333ed7..df83fd96 100644 --- a/initrd/initrd-stuff/etc/vmware-prep +++ b/initrd/initrd-stuff/etc/vmware-prep @@ -1,140 +1,50 @@ #!/bin/sh # -# Description: Kernel of a generic runlevel script file for use with -# Diskless X Stations (v4.0) - script prepares vmware -# environment. Start and stop functionality is added within -# initial ramdisk +# Kernel of a generic runlevel script file for use with OpenSLX diskless +# linux machines - script prepares vmware environment. Start and stop +# functionality is added within initialramfs # -# Author(s): Michael Janczyk , 15-04-2006 -# Dirk von Suchodoletz , 23-08-2006 -# Copyright: (c) 2003, 2006 - RZ Universitaet Freiburg +# Michael Janczyk , 15-04-2006 +# Dirk von Suchodoletz , 03-09-2006 +# +# (c) 2003, 2006 - RZ Universitaet Freiburg # # Version: 0.2.324 # -################################################################################ - - - -### VERBOSE? ################################################################### +####################################################################### # set verbose mode (set -x(v)) #set -xv - - -### CONFIGURATION ############################################################## +### CONFIGURATION ##################################################### # read configuration information . /etc/machine-setup - - -### VARIABLES SECTION ########################################################## +### VARIABLES SECTION ################################################# # Declaration of default variables vmdir=/var/lib/vmware -#path=/var/X11R6/bin -#sessions= -#session_name= - - - -### FUNCTIONS SECTION ########################################################## -# NOT NEEDED NOW -# unionfs used? -#pathtest () { -# if `touch /usr/X11R6/bin/touch >/dev/null 2>&1`; then -# path=/usr/X11R6/bin/ -# rm ${path}/touch >/dev/null 2>&1 -# else -# test -d ${path} || mkdir -p ${path} -# fi -#} - - -# loop file for exchanging information between linux and vmware -mount_loop () { - modprobe loop >/dev/null 2>&1 - mkdir -p /tmp/loop0 - cp ${vmdir}/templ/fd0.img /tmp/${clientip}-fd0.img - chmod a+rw /tmp/${clientip}-fd0.img - mount -n -t msdos -o loop,umask=000 /tmp/${clientip}-fd0.img \ - /tmp/loop0 -} - - -# device creation - the module does not trigger udev properly -vmnet () { - for i in 0 1 2 3 4 5 6 7 8 9; do - [ -c /dev/vmnet${i} ] || mknod /dev/vmnet${i} c 119 ${i}; - done - chmod 0700 /dev/vmnet* -} - -# MOVED TO INITRD -# special start script for vmware with predefined image -#copyscript () { -# # runvmware -# cp ${vmdir}/templ/runvmware ${path} -# chmod 755 ${path}/runvmware >/dev/null 2>&1 -# -# # default kdm session. Xdialog with WM and VMware images -# cp ${vmdir}/templ/defaultwm ${path}/defaultwm -# chmod 755 ${path}/defaultwm >/dev/null 2>&1 -#} - - -# MOVED TO INITRD -# blabla sessiondinens -#desktop_session () { -# echo -e "#!/bin/sh\n#\n# file generated by ${0} at ${date}\ -# \n# set to black background\nxsetroot -solid \"black\"\ -# \nstartvm=\$(echo \$0 | sed -e \"s,.*/,,\")\ -# \nxterm -bg black -fg white -geometry 100x30+0-0 +sb \ -# -e \"${path}/runvmware -s \${startvm} ${debug}\"\n" \ -# > ${path}/desktop-session -# chmod 755 ${path}/desktop-session -#} - - -# MOVED TO INITRD -# copy nach blabla -#vmsession2desktop_session () { -# sessions=$(ls ${vmdir}/vmsessions/*.desktop 2>/dev/null) -# if [ -n "${sessions}" ]; then -# for i in ${vmdir}/vmsessions/*.desktop; do -# session_name=$(cat ${i} | grep -iw "exec" \ -# | awk -F "=" '{print $2}') -# ln -s ${path}/desktop-session ${path}/${session_name} -# done -# fi -#} +### START SCRIPT ###################################################### -### START SCRIPT ############################################################### - -# create vmdir -#mkdir -p /var/lib/vmware 2>&1 - -# mount von zeugs (wohl besser in der InitRD, da sonst Sessions nicht -# rechtzeitig fuer gdm/kdm verfuegbar) -#mount -t nfs -o ro,nolock,intr,nodev,soft,timeo=2,nosuid ${imgsrv} ${vmdir} - -# check path -#pathtest +modprobe loop >/dev/null 2>&1 # device creation - the module does not trigger udev properly -vmnet - -# special start script for vmware with predefined image -#copyscript +for i in 0 1 2 3 4 5 6 7 8 9; do + [ -c /dev/vmnet${i} ] || mknod /dev/vmnet${i} c 119 ${i}; +done +chmod 0700 /dev/vmnet* # loop file for exchanging information between linux and vmware guest -mount_loop - -# blabla sessiondinens -#desktop_session - -# copy nach blabla -#vmsession2desktop_session - -# mount usbfs -mount -t usbfs usbfs /proc/bus/usb +loopsrc=/etc/vmware/loopimg +loopdst=/etc/vmware/fd-loop +mkdir -p $loopsrc +grep "unionfs" /proc/mounts >/dev/null && \ + mount -o size=1500k -t tmpfs vm-loopimg $loopsrc +mkdir -p $loopdst +cp ${vmdir}/templ/fd0.img /$loopsrc/fd1.img +chmod a+rw /$loopsrc/fd1.img +mount -n -t msdos -o loop,umask=000 /$loopsrc/fd1.img $loopdst + +# mount usbfs needed for vmware to detect usb devices +grep "/proc/bus/usb" /proc/mounts >/dev/null || \ + mount -t usbfs usbfs /proc/bus/usb diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 1e57e5f2..78ab8732 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -85,7 +85,7 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup DEBUGLEVEL=${opts#debug=} # Handle empty, extremly large or non-numeric input [ -z "$DEBUGLEVEL" ] && DEBUGLEVEL=0 - #[[ "101" < "$DEBUGLEVEL" ]] && DEBUGLEVEL=100 + [ $DEBUGLEVEL -eq 8 ] && echo "** SLX init started near $(sysup)" ;; # if configuration should be gathered by dhcp client dhcp) @@ -185,7 +185,7 @@ fi echo "Setting debuglevel to ${DEBUGLEVEL}" export MODPRV=" " export LOGFILE -if [ "${DEBUGLEVEL}" -gt 0 ] ; then +if [ "${DEBUGLEVEL}" -gt 0 -a "${DEBUGLEVEL}" != 8 ] ; then # if LOGFILE should be used within initial ramdisk add '/mnt' in front # of the variable LOGFILE="/var/log/dxs-boot.log" @@ -380,7 +380,8 @@ elif [ -z "$COWLOOP" ] ; then for path in ${D_BINDMPTS} ; do mkdir -p ${RWDIR}/${path} >/dev/null 2>&1 mount -n --bind ${RWDIR}/${path} /mnt/${path} - [ ${DEBUGLEVEL} -gt 1 ] && echo "Created ${RWDIR}/${path} and mounted it to /mnt/$path" + [ ${DEBUGLEVEL} -gt 1 -a ${DEBUGLEVEL} != 8 ] && \ + echo "Created ${RWDIR}/${path} and mounted it to /mnt/$path" done # see above ... ldcfg @@ -392,7 +393,6 @@ elif [ -z "$COWLOOP" ] ; then # exclude them from etc copy process too echo ${path}|sed -e "s,/root/,," >>/tmp/etc.exclude mkdir -p /root/${path} >/dev/null 2>&1 - #[ ${DEBUGLEVEL} -gt 0 ] && | #echo " ${path} (without /root path component)" >>$LOGFILE mount -n --bind /mnt/${path} /root/${path} >/dev/null 2>&1 fi done @@ -454,8 +454,6 @@ usbfs\t\t/proc/bus/usb\tusbfs\t\tnoauto\t\t 0 0" >/mnt/etc/fstab || \ error "$init_fstab" echo -e "rootfs / rootfs rw 0 0\ninitramdevs /dev tmpfs rw\ 0 0" > /mnt/etc/mtab -[ -z "$UNIONFS" ] && echo -e "ramfs /tmp tmpfs rw 0 0\nramfs /root \ -tmpfs rw 0 0\n" >> /mnt/etc/mtab # copy library cache if generated if [ -z "${NOLDSC}" ] ; then @@ -487,7 +485,7 @@ postinit /bin/postinit.local; } # start a debug shell in higher debug levels -[ $DEBUGLEVEL -gt 2 ] && /bin/sh +[ $DEBUGLEVEL -gt 2 -a $DEBUGLEVEL != 8 ] && /bin/sh # unmount the bind mounted modules directory for i in 0 40 100 200 300 500 800 1000 1200; do @@ -500,11 +498,14 @@ done test -f /mnt/etc/inittab || error "$init_erritab" # close runlevel script for stuff to execute during early bootup d_mkrlscript close boot.ld "" +# put /tmp into stage4 mtab +sed -n "s,/mnt,,;/\/tmp /p" /proc/mounts >> /mnt/etc/mtab # preparations to leave initrd - umounting ... umount -n /sys || error "$init_errsys" nonfatal umount -n /proc/bus/usb >/dev/null 2>&1 mount -n --move /dev /mnt/dev killall -9 udevd 2>/dev/null +[ $DEBUGLEVEL -eq 8 ] && echo "** SLX init ended near $(sysup)" umount -n /proc # unset old environment variables unset debug date initrd ip dnbdroot nbdroot nfsroot vci vga diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 6a18fd93..ea1fd16c 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -4,7 +4,7 @@ # ramdisks for linux diskless clients (stage2 system # setup) # -# Author(s): Dirk von Suchodoletz , 16-08-2006 +# Author(s): Dirk von Suchodoletz , 03-09-2006 # Nico Dietrich # Felix Endres # @@ -647,14 +647,17 @@ chmod 755 ${INSTDIR}/init \ if [ -f /var/lib/openslx/config/default/initramfs/machine-setup ] ; then cp /var/lib/openslx/config/default/initramfs/machine-setup \ ${INSTDIR}/etc/machine-setup + echo "Using /var/lib/openslx/config/default/initramfs/machine-setup" # use the installed default machine-setup.default elif [ -f /usr/share/openslx/templates/machine-setup.default ] ; then cp /usr/share/openslx/templates/machine-setup.default \ ${INSTDIR}/etc/machine-setup + echo "Using /usr/share/openslx/templates/machine-setup.default" # just compatibility for older versions elif [ -f /etc/dxs/client.cfg/machine-setup.default ] ; then cp /etc/dxs/client.cfg/machine-setup.default \ ${INSTDIR}/etc/machine-setup + echo "Using /etc/dxs/client.cfg/machine-setup.default" # fixme: dirty hack if the installer does not creates a normal file elif [ -f /etc/dxs/client.cfg/machine-setup.default.new ] ; then cp /etc/dxs/client.cfg/machine-setup.default.new \ @@ -662,6 +665,7 @@ elif [ -f /etc/dxs/client.cfg/machine-setup.default.new ] ; then elif [ -f ../installer/default_files/machine-setup.default ] ; then cp ../installer/default_files/machine-setup.default \ ${INSTDIR}/etc/machine-setup + echo "Using ../installer/default_files/machine-setup.default" else #inserted password for root for debugging purposes echo -e "# default for machine-setup does not exist\n# root logins are \ diff --git a/installer/default_files/dhcpd.conf b/installer/default_files/dhcpd.conf index 38e612f7..12f06df3 100644 --- a/installer/default_files/dhcpd.conf +++ b/installer/default_files/dhcpd.conf @@ -105,7 +105,8 @@ group { option start-snmp "no"; option netbios-workgroup "tux-net"; option tex-enable "yes"; - option vmware "yes"; + option vmware "no"; +# option vmware "nfs://server/pfad"; # alternative option desktop-session "kde,gnome"; option language "de_DE de-latin1-nodeadkeys"; # option hw-mouse "ps/2 psaux"; diff --git a/installer/default_files/machine-setup.default b/installer/default_files/machine-setup.default index de38eb0e..c2991f4a 100644 --- a/installer/default_files/machine-setup.default +++ b/installer/default_files/machine-setup.default @@ -81,7 +81,8 @@ netbios_workgroup="dxs-network" # configure and start vmware services vmware="no" -#imgsrv="(proto://)$serverip/dxs/vmware" +#vmware="(proto://)$serverip/dxs/vmware" +# imgsrv is deprecated, because incorporated into vmware variable # kind of X11 display manager to run start_xdmcp="xdm" diff --git a/vmware/runvmware b/vmware/runvmware index 65aec286..c6b5d7f7 100755 --- a/vmware/runvmware +++ b/vmware/runvmware @@ -193,7 +193,7 @@ cdr_2_name="/dev/cdrom1" floppya="FALSE" floppyb="FALSE" # place for the virtual floppy "B:" -floppybname="/tmp/${clientip}-fd0.img" +floppybname="/etc/vmware/loopimg/fd1.img" # resolution hostres=$(xvidtune -show | grep -ve "^$") xres=$(echo "${hostres}" | awk '{print $3}') @@ -297,7 +297,7 @@ Image options: --include include code right before program start --displayaliases aliases you can use with option -a --floppya enable floppy disk - --floppyb use /tmp/loop0 as floppy B, + --floppyb use /etc/vmware/fd-loop as floppy B, needed for exchanging files w/ VMware VMware options: --run specify programm, e.g. vmware, vmplayer, ... diff --git a/vmware/winconfig b/vmware/winconfig index 676fe141..84ccf482 100644 --- a/vmware/winconfig +++ b/vmware/winconfig @@ -3,19 +3,6 @@ # # create Windows config file - -# NO LONGER NEEDED !!!!! -# definition of some resolution variables -#hostres=$(xvidtune -show | grep -ve "^$") -#x_param=$(echo "${hostres}" | awk '{print $3}') -#y_param=$(echo "${hostres}" | awk '{print $7}') -#resolution=" -# \r -# \r -# \r -# \r" - - # VMplayer does not need resolution change #if [ `which vmplayer 2>/dev/null` ] && [ -z "${vmrun}" ] \ # || [ "${vmrun}" = "vmplayer" ]; then @@ -34,6 +21,6 @@ echo -e "\r \r \r" \ -> /tmp/loop0/config.xml +> /etc/vmware/fd-loop/config.xml sync -- cgit v1.2.3-55-g7522