summaryrefslogtreecommitdiff
path: root/components/9990-misc-helpers.sh
diff options
context:
space:
mode:
authorJan Blunck <jblunck@vyatta.com>2013-09-03 10:41:42 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2013-09-13 14:15:56 +0200
commite5904f5079fd4362c4dd63027075fce4b47c51c5 (patch)
tree50ae6f24f81bf77cb0e0567e2c2790b7780ed24f /components/9990-misc-helpers.sh
parente74c8d150c05d266f87bf15b330999b19acec269 (diff)
downloadlive-boot-e5904f5079fd4362c4dd63027075fce4b47c51c5.tar.gz
live-boot-e5904f5079fd4362c4dd63027075fce4b47c51c5.zip
Blacklist devices used for /live/rootfs/* insted of /live/medium.
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.
Diffstat (limited to 'components/9990-misc-helpers.sh')
-rwxr-xr-xcomponents/9990-misc-helpers.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/components/9990-misc-helpers.sh b/components/9990-misc-helpers.sh
index 4c8383d..2515ea1 100755
--- a/components/9990-misc-helpers.sh
+++ b/components/9990-misc-helpers.sh
@@ -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