X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=15710c29b3e0b131adcc69ecc863c8cc8c93dc2f;hb=97a04033aa1534bd62aa0bbf4e83c79c9827f1ec;hp=ee363c3e46cc1e07bfe65ed5d3fd5c498784baa6;hpb=824751b466aa756868883aa38cb8d0f1fc4c51bb;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index ee363c3..15710c2 100755 --- a/scripts/live +++ b/scripts/live @@ -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 - udevtrigger - udevsettle + if [ -x /sbin/udevadm ] + then + # lenny + udevadm trigger + udevadm settle + else + # etch + udevtrigger + udevsettle + fi ipconfig ${DEVICE} | tee /netboot.config @@ -875,7 +883,7 @@ try_snap () fi else # cpio.gz snapshot - if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio -i -u -d 2>/dev/null) + if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio --extract --preserve-modification-time --no-absolute-filenames --sparse --unconditional --make-directories > /dev/null 2>&1) then log_warning_msg "Impossible to include the ${snapfile} Snapshot" return 1 @@ -1041,8 +1049,16 @@ setup_unionfs () modprobe -q -b ${module} done - udevtrigger - 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 @@ -1192,12 +1210,6 @@ check_dev () devname=$(sys2dev "${sysdev}") fi - if [ -n "${LIVE_MEDIA_OFFSET}" ] - then - loopdevname=$(setup_loop "${devname}" "loop" "/sys/block/loop*" "${LIVE_MEDIA_OFFSET}" '') - devname="${loopdevname}" - fi - if [ -d "${devname}" ] then mount -o bind "${devname}" $mountpoint || continue @@ -1211,6 +1223,12 @@ check_dev () fi fi + if [ -n "${LIVE_MEDIA_OFFSET}" ] + then + loopdevname=$(setup_loop "${devname}" "loop" "/sys/block/loop*" "${LIVE_MEDIA_OFFSET}" '') + devname="${loopdevname}" + fi + fstype=$(get_fstype "${devname}") if is_supported_fs ${fstype}