X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=e69396e10cd8606f665dadbedeb78d805a942b08;hb=dde97bb32a6c30e3329485d2d3e2b35539339b8d;hp=952d4796ce4a0bf6c1a1328573a217dbb33a5b6a;hpb=3f02456e392ead3abf36bc181692fcb75c8f16f3;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index 952d479..e69396e 100755 --- a/scripts/live +++ b/scripts/live @@ -253,6 +253,11 @@ Arguments () export PERSISTENT ;; + persistent-media=*) + PERSISTENT_MEDIA="${ARGUMENT#*=}" + export PERSISTENT_MEDIA + ;; + persistent-path=*) PERSISTENT_PATH="${ARGUMENT#persistent-path=}" export PERSISTENT_PATH @@ -480,7 +485,7 @@ is_nice_device () { sysfs_path="${1#/sys}" - if /lib/udev/path_id "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-|platform-sata_mv|platform-orion-ehci|platform-mmc|platform-mxsdhci|)" + if /lib/udev/path_id "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-[^-]*-(ide|sas|scsi|usb|virtio)|platform-sata_mv|platform-orion-ehci|platform-mmc|platform-mxsdhci)" then return 0 elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$' @@ -1199,7 +1204,7 @@ setup_unionfs () if [ "${UNIONTYPE}" = "aufs" ] then - roopt="rr" + roopt="rr+wh" noxino_opt="noxino," elif [ "${UNIONTYPE}" = "unionfs-fuse" ] then @@ -1324,6 +1329,7 @@ setup_unionfs () # Looking for "${root_persistence}" device or file if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ] then + if [ -z "${QUICKUSBMODULES}" ] then # Load USB modules @@ -1351,6 +1357,18 @@ setup_unionfs () done fi + case "${PERSISTENT_MEDIA}" in + removable) + whitelistdev="$(removable_dev)" + ;; + removable-usb) + whitelistdev="$(removable_usb_dev)" + ;; + *) + whitelistdev="" + ;; + esac + # search for label and files (this could be hugely optimized) cowprobe=$(find_cow_device "${root_persistence}" "${blacklistdev}" "${whitelistdev}") if [ -b "${cowprobe}" ] @@ -1665,7 +1683,7 @@ check_dev () echo ${mountpoint} return 0 else - umount ${mountpoint} + umount ${mountpoint} 2>/dev/null fi fi