X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=d3c86a20427126cd5beb6f84a47f72e654d2aab7;hb=d3e2b6e753e8e47e02db296f36fd52f155896311;hp=bf30b50f9462d101778ca2d4237bedc1d6154b4a;hpb=747c6ba5a62ab673f44508cef2ed180b6dc32937;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index bf30b50..d3c86a2 100755 --- a/scripts/live +++ b/scripts/live @@ -456,7 +456,7 @@ Arguments () if [ -z "${UNIONTYPE}" ] then - UNIONTYPE="unionfs" + UNIONTYPE="aufs" export UNIONTYPE fi } @@ -561,6 +561,9 @@ is_nice_device () if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-[ide|scsi|usb])" then return 0 + elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$' + then + return 0 fi return 1 @@ -650,8 +653,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 @@ -711,9 +722,20 @@ do_httpmount () squashfs|tgz|tar) if [ "${webfile}" = "FETCH" ] then - [ "${quiet}" != "y" ] && - log_begin_msg "Trying wget ${url} -O ${dest}/$(basename ${url})" - wget "${url}" -O "${dest}/$(basename ${url})" + case "$url" in + tftp*) + ip="$(dirname $url | sed -e 's|tftp://||g')" + [ "${quiet}" != "y" ] && + log_begin_msg "Trying tftp -g -b 10240 -r $(basename ${url}) -l ${dest}/$(basename ${url}) $ip" + tftp -g -b 10240 -r $(basename ${url}) -l ${dest}/$(basename ${url}) $ip + ;; + + *) + [ "${quiet}" != "y" ] && + log_begin_msg "Trying wget ${url} -O ${dest}/$(basename ${url})" + wget "${url}" -O "${dest}/$(basename ${url})" + ;; + esac else [ "${quiet}" != "y" ] && log_begin_msg "Trying to mount ${url} on ${dest}/$(basename ${url})" @@ -1008,7 +1030,7 @@ setup_unionfs () rofslist="${image} ${rofslist}" elif [ -f "${image}" ] then - if /sbin/losetup --help 2>&1 | grep -q -- "-r\b" + if losetup --help 2>&1 | grep -q -- "-r\b" then backdev=$(get_backing_device "${image}" "-r") else @@ -1041,8 +1063,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 +1094,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 @@ -1091,6 +1123,7 @@ setup_unionfs () else cowdevice="tmpfs" cow_fstype="tmpfs" + cow_mountopt="rw,noatime,mode=755" fi if [ "${cow_fstype}" = "nfs" ] @@ -1100,7 +1133,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