export PERSISTENT
;;
+ persistent-media=*)
+ PERSISTENT_MEDIA="${ARGUMENT#*=}"
+ export PERSISTENT_MEDIA
+ ;;
+
persistent-path=*)
PERSISTENT_PATH="${ARGUMENT#persistent-path=}"
export PERSISTENT_PATH
{
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]$'
if [ "${UNIONTYPE}" = "aufs" ]
then
- roopt="rr"
+ roopt="rr+wh"
noxino_opt="noxino,"
elif [ "${UNIONTYPE}" = "unionfs-fuse" ]
then
# Looking for "${root_persistence}" device or file
if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
then
+
if [ -z "${QUICKUSBMODULES}" ]
then
# Load USB modules
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}" ]
echo ${mountpoint}
return 0
else
- umount ${mountpoint}
+ umount ${mountpoint} 2>/dev/null
fi
fi