Commit 174e44b9 authored by Tails developers's avatar Tails developers
Browse files

live-persist: restrict search devices as live-boot

If no --media argument is specified, restrict devices search for persistence
using live-boot's "(live-media|bootfrom)=removable(|-usb)" argument.
parent e3439981
......@@ -149,7 +149,15 @@ list_gpt_volumes ()
[ -z "${whitelistdev}" ] && return
;;
*)
whitelistdev=""
if grep -qs -w -E '(live-media|bootfrom)=removable-usb' /proc/cmdline ; then
whitelistdev="$(removable_usb_dev)"
[ -z "${whitelistdev}" ] && return
elif grep -qs -w -E '(live-media|bootfrom)=removable' /proc/cmdline ; then
whitelistdev="$(removable_dev)"
[ -z "${whitelistdev}" ] && return
else
whitelistdev=""
fi
;;
esac
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment