From 41112e3945280cb19dab1fed2b224a763e97fe55 Mon Sep 17 00:00:00 2001 From: Tails developers Date: Mon, 1 Nov 2010 18:30:19 +0100 Subject: Adding support for persistent-media={removable,removable-usb}. This is e.g. needed when one's threat model does not allow her to trust the local hard disks. --- scripts/live | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'scripts') diff --git a/scripts/live b/scripts/live index 952d479..c2ad14e 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 @@ -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}" ] -- cgit v1.2.3