Replacing previous imperfect changes for udevadm with check for udevadm and using...
[live-boot-grml.git] / scripts / live
index bf30b50..15710c2 100755 (executable)
@@ -456,7 +456,7 @@ Arguments ()
 
        if [ -z "${UNIONTYPE}" ]
        then
-               UNIONTYPE="unionfs"
+               UNIONTYPE="aufs"
                export UNIONTYPE
        fi
 }
@@ -650,8 +650,16 @@ do_netmount ()
 
        modprobe -q af_packet # For DHCP
 
-       udevadm trigger
-       udevsettle
+       if [ -x /sbin/udevadm ]
+       then
+               # lenny
+               udevadm trigger
+               udevadm settle
+       else
+               # etch
+               udevtrigger
+               udevsettle
+       fi
 
        ipconfig ${DEVICE} | tee /netboot.config
 
@@ -1041,8 +1049,16 @@ setup_unionfs ()
                        modprobe -q -b ${module}
                done
 
-               udevadm trigger
-               udevsettle
+               if [ -x /sbin/udevadm ]
+               then
+                       # lenny
+                       udevadm trigger
+                       udevadm settle
+               else
+                       # etch
+                       udevtrigger
+                       udevsettle
+               fi
 
                # For some reason, udevsettle does not block in this scenario,
                # so we sleep for a little while.
@@ -1064,10 +1080,12 @@ setup_unionfs ()
                then
                        cowdevice=${cowprobe}
                        cow_fstype=$(get_fstype "${cowprobe}")
+                       cow_mountopt="rw,noatime"
                else
                        [ "${quiet}" != "y" ] && log_warning_msg "Unable to find the persistent medium"
                        cowdevice="tmpfs"
                        cow_fstype="tmpfs"
+                       cow_mountopt="rw,noatime,mode=755"
                fi
        elif [ -n "${NFS_COW}" ] && [ -z "${NOPERSISTENT}" ]
        then
@@ -1100,7 +1118,7 @@ setup_unionfs ()
                nfsmount ${nfs_cow_opts} ${cowdevice} /cow || \
                        panic "Can not mount ${cowdevice} (n: ${cow_fstype}) on /cow"
        else
-               mount -t ${cow_fstype} -o rw,noatime ${cowdevice} /cow || \
+               mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || \
                        panic "Can not mount ${cowdevice} (o: ${cow_fstype}) on /cow"
        fi