First, srry, my previous patch was wrong, here is better one (unless you 
figured thos out already).

Still, part.script is totally broken. Here is my original fstab:

/dev/hdb5 / reiserfs notail 1 1
none /dev/pts devpts mode=0620 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdc /mnt/cdrom auto 
user,iocharset=koi8-r,umask=0,exec,codepage=866,ro,noauto 0 0
/dev/scd0 /mnt/cdrom2 auto 
user,iocharset=koi8-r,umask=0,exec,codepage=866,ro,noauto 0 0
/dev/fd0 /mnt/floppy auto 
user,iocharset=koi8-r,umask=0,sync,exec,codepage=866,noauto 0 0
/dev/sda4 /mnt/hd ext2 noauto 0 0
/dev/hda1 /mnt/win_c vfat iocharset=koi8-r,umask=0,codepage=866 0 0
/dev/hda5 /mnt/win_d vfat iocharset=koi8-r,umask=0,codepage=866 0 0
none /proc proc defaults 0 0
/dev/hdb6 swap swap defaults 0 0
/dev/hdb7 /mnt/hdb7 reiserfs notail 1 1
/dev/VG/1 /lvm reiserfs notail,noauto 0 0

and here is fstab I get after booting with part.script enebled

{pts/1}% cat /etc/fstab

/dev/cdrom              /mnt/cdrom              iso9660 
noauto,owner,kudzu,ro 0
0
/dev/cdrom1             /mnt/cdrom1             iso9660 
noauto,owner,kudzu,ro 0
0

and all mount point in /mnt are removed.

I told you updfstab was unsupported :-) Besides, what happens with 
supermount? Where are NLS options?  You cannot release it in this state.

-andrej

--- /etc/dynamic/scripts/part.script.bor        Sun Sep 16 07:22:57 2001
+++ /etc/dynamic/scripts/part.script    Sun Sep 16 23:35:27 2001
@@ -12,8 +12,15 @@
 
 . /etc/dynamic/scripts/functions.script
 
-case `runlevel` in
-    unknown) exit;;
+# Paranoid check
+[ -f /proc/mounts ] || exit
+
+# Do nothing when root is mounted ro (mostly in rc.sysinit)
+ROOTOPTS=`awk '$2 == "/" {print $4}' /proc/mounts`
+case ",$ROOTOPTS," in
+    *,ro,* )
+       exit 0
+    ;;
 esac
 
 if [ -x /usr/sbin/updfstab ]; then
@@ -31,8 +38,10 @@
            call_hooks add part $mpoint $dev
            ;;
        '-')
-           fuser -skm $mpoint
-           umount $mpoint
+           if grep "[[:space:]]$mpoint[[:space:]]" /proc/mounts > /dev/null 2>&1 ; 
+then
+               fuser -skm $mpoint
+               umount $mpoint
+           fi
            rmdir $mpoint
            cp -f /etc/fstab.dynamic /etc/fstab
            call_hooks del part $mpoint $dev

Reply via email to