diff options
author | Dirk von Suchodoletz | 2008-08-24 01:55:21 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2008-08-24 01:55:21 +0200 |
commit | bc6a3d6a230c542588732d09cc38bddfb2fbd8e4 (patch) | |
tree | d164d83e9ab08d6acca1376760c3d60ab8878b32 | |
parent | Problems reported by Reiner hopefully fixed (nis, see #265). (diff) | |
download | core-bc6a3d6a230c542588732d09cc38bddfb2fbd8e4.tar.gz core-bc6a3d6a230c542588732d09cc38bddfb2fbd8e4.tar.xz core-bc6a3d6a230c542588732d09cc38bddfb2fbd8e4.zip |
Several fixes, improvements:
* clean the nfs mounted /tmp (Detlef pointed out several
problems here)
* kill the debug shell if started in stage3, closes #261
* small fix on config_nis in suse/functions-default
* mount /var/cache/fontconfig in SuSE10.2 too (speeds up
gdm start)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2089 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r-- | initramfs/distro-specs/suse/functions-default | 4 | ||||
-rwxr-xr-x | initramfs/stage3-stuff/bin/servconfig | 5 | ||||
-rwxr-xr-x | initramfs/stage3-stuff/init | 15 |
3 files changed, 17 insertions, 7 deletions
diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default index 857684fb..6b2ce754 100644 --- a/initramfs/distro-specs/suse/functions-default +++ b/initramfs/distro-specs/suse/functions-default @@ -31,7 +31,7 @@ X11/xdm/pixmaps\n*.rpmsave\ndhclient*script" D_BINDMPTS="tmp root media home" D_DIRINBINDMNT="/var/run /var/log /var/tmp" D_RODIRSINRW="/etc/opt/gnome/gconf /etc/X11/xkb /var/adm /var/lib/texmf \ -/var/lib/rpm" +/var/lib/rpm /var/cache/fontconfig" D_DIRINDXS="/var/X11R6/compose-cache /var/run/sysconfig/tmp /var/adm \ /var/lib/rpm /var/lib/nobody /var/lib/pam_devperm /var/lib/bluetooth \ /var/lib/texmf /var/lib/nfs/sm /var/lib/misc /var/lib/acpi /var/spool/cron \ @@ -579,7 +579,7 @@ config_portmap () { } # start NIS (mostly deprecated) config_nis () { -if [ -f /mnt/etc/init.d/ypbind -a ] ; then +if [ -f /mnt/etc/init.d/ypbind ] ; then rllinker "ypbind" 6 16 config_portmap testmkd /mnt/var/yp/nicknames diff --git a/initramfs/stage3-stuff/bin/servconfig b/initramfs/stage3-stuff/bin/servconfig index 23d5dbee..707f91b9 100755 --- a/initramfs/stage3-stuff/bin/servconfig +++ b/initramfs/stage3-stuff/bin/servconfig @@ -278,8 +278,11 @@ if [ -n "$scratch" -a -z "$tmpisdisk" ] ; then # should be configured ... it is possible to mount "nolock" only mount -t nfs -o rw,tcp,nolock,intr,nodev,soft,timeo=2,nosuid \ ${tmpserv}:${tmppath} /tmp/scratch >/dev/null 2>&1 && { + if [ -d /tmp/scratch/${clientip} ] ; then + mv /tmp/scratch/${clientip} /tmp/scratch/${clientip}.totrash + rm -rf /tmp/scratch/${clientip}.totrash 2>/dev/null & + fi testmkd /tmp/scratch/${clientip} - umount /tmp/scratch # no need for tempfs there ... umount /mnt/tmp >/dev/null 2>&1 mount -t nfs -o rw,tcp,nolock,intr,nodev,soft,timeo=2,nosuid \ diff --git a/initramfs/stage3-stuff/init b/initramfs/stage3-stuff/init index 87e11ccb..4fe62596 100755 --- a/initramfs/stage3-stuff/init +++ b/initramfs/stage3-stuff/init @@ -143,8 +143,11 @@ in $0\ncountry=\"${COUNTRY}\"" >>/etc/initramfs-setup if [ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] ; then echo "** SLX init started near $(sysup)" elif [ $DEBUGLEVEL -ge 3 -a $DEBUGLEVEL -le 20 ] ; then + # create, start a debug shell process echo "Debug shell started on second console (tty2)" - getty -i -n -l /bin/ash 38400 tty2 & + echo -e "#!/bin/ash\nash" >/bin/debugshell + chmod u+x /bin/debugshell + getty -i -n -l /bin/debugshell 38400 tty2 & fi ;; # essid for WLAN boot (experimental, might be moved to a module component @@ -874,12 +877,16 @@ postinit runinithook '90-postinit-done' -# unmount the bind mounted modules directory +# unmount the bind mounted modules directory and nfs /tmp/scratch (if present) export ticks for ticks in 0 1 2 5 10 20 30; do sleep $ticks && umount -n /lib/modules/${KERNEL} 2>/dev/null && break error "$init_wait" nonfatal done +mount 2>/dev/null | grep -q "/tmp/scratch type nfs" && \ + for ticks in 0 1 2 5 10 20 30; do + sleep $ticks && umount -n /tmp/scratch 2>/dev/null && break + done mount 2>/dev/null | grep -q /lib/modules/${KERNEL} && error "$init_errumnt" # check for inittab file (might fail for new style init -> upstart) @@ -892,13 +899,13 @@ sed -n "s,/mnt,,;/\/tmp /p" /proc/mounts >> /mnt/etc/mtab # preparations to leave initramfs - umounting ... umount -n /sys || error "$init_errsys" nonfatal umount -n /proc/bus/usb >/dev/null 2>&1 -chmod 1777 /mnt/dev/shm /mnt/tmp /mnt/tmp/scratch 2>/dev/null +chmod 1777 /mnt/dev/shm /mnt/tmp 2>/dev/null mount -n --move /dev /mnt/dev runinithook '95-cleanup' # kill hwautocfg, servconfig -killall -9 hwautocfg servconfig 2>/mnt/dev/null +killall -9 hwautocfg servconfig debugshell 2>/mnt/dev/null # runtimer [ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \ echo "** SLX init ended near $(sysup)" |