Skip to content

Commit

Permalink
Blacklist devices used for /live/rootfs/* insted of /live/medium.
Browse files Browse the repository at this point in the history
The path /live/medium is used for probing different devices when searching
for the live rootfs. There is no reason why that device should be banned
from being used for persistence storage. Instead the devices that are
actually used as the backing storage for the live rootfs should be banned.
  • Loading branch information
Jan Blunck authored and daniel-baumann committed Sep 13, 2013
1 parent e74c8d1 commit e5904f5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion components/9990-misc-helpers.sh
Expand Up @@ -932,7 +932,17 @@ find_persistence_media ()
white_listed_devices="${2}"
ret=""

black_listed_devices="$(what_is_mounted_on /live/medium) $(what_is_mounted_on /live/findiso) $(what_is_mounted_on /live/fromiso)"
#
# The devices that are hosting the actual live rootfs should not be
# used for persistence storage since otherwise you might mount a
# parent directory on top of a sub-directory of the same filesystem
# in one union together.
#
black_listed_devices=""
for d in /live/rootfs/* /live/findiso /live/fromiso
do
black_listed_devices="${black_listed_devices} $(what_is_mounted_on d)"
done

for dev in $(storage_devices "${black_listed_devices}" "${white_listed_devices}")
do
Expand Down

0 comments on commit e5904f5

Please sign in to comment.