diff -Naur ltsp.orig/i386/etc/inittab ltsp.new/i386/etc/inittab --- ltsp.orig/i386/etc/inittab 2004-07-12 21:07:54.000000000 +0200 +++ ltsp.new/i386/etc/inittab 2004-11-22 16:58:54.000000000 +0100 @@ -12,15 +12,16 @@ s1:5:respawn:/bin/startsess tty1 /etc/screen_session s2:5:respawn:/bin/startsess tty2 /etc/screen_session s3:5:respawn:/bin/startsess tty3 /etc/screen_session -s4:5:off:/bin/startsess tty4 /etc/screen_session -s5:5:off:/bin/startsess tty5 /etc/screen_session -s6:5:off:/bin/startsess tty6 /etc/screen_session +s4:5:respawn:/bin/startsess tty4 /etc/screen_session +s5:5:respawn:/bin/startsess tty5 /etc/screen_session +s6:5:respawn:/bin/startsess tty6 /etc/screen_session s7:5:off:/bin/startsess tty7 /etc/screen_session s8:5:off:/bin/startsess tty8 /etc/screen_session s9:5:off:/bin/startsess tty9 /etc/screen_session sa:5:off:/bin/startsess tty10 /etc/screen_session sb:5:off:/bin/startsess tty11 /etc/screen_session sc:5:off:/bin/startsess tty12 /etc/screen_session +sd:5:once:/etc/switchvt # # Start the printers @@ -32,3 +33,4 @@ l:345:respawn:/etc/run_ltspinfod s:0:wait:/bin/sh /etc/rc.shutdown r:6:wait:/bin/sh /etc/rc.reboot +ca:12345:ctrlaltdel:/sbin/reboot diff -Naur ltsp.orig/i386/etc/passwd.tpl ltsp.new/i386/etc/passwd.tpl --- ltsp.orig/i386/etc/passwd.tpl 1970-01-01 01:00:00.000000000 +0100 +++ ltsp.new/i386/etc/passwd.tpl 2004-11-22 16:43:51.000000000 +0100 @@ -0,0 +1,5 @@ +root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/bin: +sshd:x:74:74:sshd:/:/bin/false +nobody:x:99:99:Nobody:/:/bin/false ++:::::: diff -Naur ltsp.orig/i386/etc/rc.localdev ltsp.new/i386/etc/rc.localdev --- ltsp.orig/i386/etc/rc.localdev 2004-08-20 06:46:15.000000000 +0200 +++ ltsp.new/i386/etc/rc.localdev 2004-11-22 17:37:50.000000000 +0100 @@ -27,13 +27,18 @@ # if [ "${FOUND_ONE}" = "N" ]; then FOUND_ONE=Y - mkdir ${SAMBATMP} + mkdir -p ${SAMBATMP} cat <<-EOF >${SAMBACNF} [global] workgroup = ${WORKGROUP:-"LTSP"} security = SHARE - smb passwd file = /etc/passwd - guest account = nobody + smb passwd file = ${SMBPASSWD:-"/etc/passwd"} + encrypt passwords= ${SMBENCRYPTPW:-"false"} + guest account = ${SMBGUESTACC:-"nobody"} + debuglevel = ${SMBDEBUGLEVEL:-"0"} + wins server = ${SMBWINS:-""} + local master = ${SMBLOCALMASTER:-"No"} + server string = ${SMBSERVERSTRING:-"%m"} log file = /tmp/samba/%m.log max log size = 2 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 @@ -76,6 +81,7 @@ ;; sd* ) modprobe scsi_mod modprobe sd_mod + modprobe vfat RW="rw" SRW="no" FS="auto" @@ -92,7 +98,14 @@ [${SHARE}] path = /tmp/${SHARE} read only = ${SRW} - guest ok = Yes + EOF + if [ ! -z "${SMBONETIMEPASS}" ] && [ ! -z "${SMBGUESTACC}" ]; then + echo " user = ${SMBGUESTACC} " >> ${SAMBACNF} + echo " guest ok = No " >> ${SAMBACNF} + else + echo " guest ok = yes " >> ${SAMBACNF} + fi + cat <<-EOF >>${SAMBACNF} locking = no EOF mkdir /tmp/${SHARE} @@ -102,6 +115,12 @@ done if [ "${START_SAMBA}" = "Y" ] ; then + killall smbd > /dev/null 2>&1 smbd -D -s /tmp/smb.conf fi +if [ "${SMBSTARTNMBD}" ]; then + if [ -z "`pgrep nmbd`" ]; then # no need to restart nmbd, once started. + nmbd -D -s /tmp/smb.conf + fi +fi diff -Naur ltsp.orig/i386/etc/rc.sysinit ltsp.new/i386/etc/rc.sysinit --- ltsp.orig/i386/etc/rc.sysinit 2004-07-18 17:10:18.000000000 +0200 +++ ltsp.new/i386/etc/rc.sysinit 2004-11-22 19:09:53.000000000 +0100 @@ -53,11 +53,21 @@ /sbin/mke2fs -q -m0 /dev/ram1 ${RAMDISK_SIZE} /bin/mount -n /dev/ram1 /tmp +cp /etc/passwd.tpl /tmp/passwd + # # A place to store information that is retrieved by ltspinfod # mkdir /tmp/info +# System knows about boot is in process. +# Useable for one-time jobs _after_ e.g. switching back to vt1 +# _after_ launching X-Windows + +if [ ! -z ${SWITCHVT1AFTERBOOT} ]; then + echo "1" > /tmp/info/bootup # there is no "touch" +fi + # # Find out if we want to allow local applications # @@ -381,14 +391,27 @@ pr_set 94 "Starting ypbind" echo "Starting ypbind" - if [ -z "${NIS_SERVER}" ]; then - ypbind -broadcast - else - ypbind -f /tmp/yp.conf + if [ "${START_NIS}" ]; then + echo "+::::::" >> /tmp/passwd + if [ -z "${NIS_SERVER}" ]; then + ypbind -broadcast + else + ypbind -f /tmp/yp.conf + fi + fi + if [ "${START_SSHD}" ]; then + echo "Starting sshd..." + sshd fi - echo "Starting sshd..." - sshd + if [ "${SMBONETIMEPASS}" ] && [ ! -z "${SMBGUESTACC}" ]; then + grep -v "+:::::" < /tmp/passwd > /tmp/passwd.tmp || cp /etc/passwd.tpl /tmp/passwd + cp /tmp/passwd.tmp /tmp/passwd + echo "${SMBGUESTACC}:x:100:100:Nobody:/:/bin/false" >> /tmp/passwd + if [ "${START_NIS}" ]; then + echo "+:::::" >> /tmp/passwd + fi + fi fi diff -Naur ltsp.orig/i386/etc/screen.d/rdesktop ltsp.new/i386/etc/screen.d/rdesktop --- ltsp.orig/i386/etc/screen.d/rdesktop 2004-07-27 07:16:40.000000000 +0200 +++ ltsp.new/i386/etc/screen.d/rdesktop 2004-11-22 18:47:49.000000000 +0100 @@ -159,7 +159,7 @@ echo echo echo -echo -n " Press to Login " +echo -n " Press to Login to ${RDP_SERVER}" read if [ -w /proc/progress ]; then diff -Naur ltsp.orig/i386/etc/screen.d/startx ltsp.new/i386/etc/screen.d/startx --- ltsp.orig/i386/etc/screen.d/startx 2004-07-19 05:50:02.000000000 +0200 +++ ltsp.new/i386/etc/screen.d/startx 2004-11-22 20:13:36.000000000 +0100 @@ -21,11 +21,11 @@ XFCFG=/tmp/XF86Config.${TTY} export TTY -if [ $# -lt 1 ]; then - XF_ARGS="" -else - XF_ARGS=$* -fi +#if [ $# -lt 1 ]; then +# XF_ARGS="" +#else +# XF_ARGS=$* +#fi ################################################################################ # diff -Naur ltsp.orig/i386/etc/switchvt ltsp.new/i386/etc/switchvt --- ltsp.orig/i386/etc/switchvt 1970-01-01 01:00:00.000000000 +0100 +++ ltsp.new/i386/etc/switchvt 2004-11-22 17:03:37.000000000 +0100 @@ -0,0 +1,8 @@ +#!/bin/bash + +VALUE=`/bin/getltscfg SWITCHVT1AFTERBOOT` +if [ -f "/tmp/info/bootup" ]; then + rm /tmp/info/bootup + sleep $VALUE + chvt 1 +fi