summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2015-02-15 17:24:39 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-05-17 20:30:12 +0200
commit94de28deace2c7c3df13790f326f9206d5fe898e (patch)
tree65d4d25b3892809e3bab73ae03e9eab1d737acda /components
parentb6c5221a9c9b2c2020ba1b53ff618cf972d1b2f8 (diff)
downloadlive-boot-94de28deace2c7c3df13790f326f9206d5fe898e.tar.gz
live-boot-94de28deace2c7c3df13790f326f9206d5fe898e.zip
Patch by Steven Shiau <steven@nchc.org.tw>. The only changes so far are:
* drop the parts of the patch that are not relevant to live-boot 5.x * adapt formatting to match Debian Live coding standards
Diffstat (limited to 'components')
-rwxr-xr-xcomponents/9990-misc-helpers.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/components/9990-misc-helpers.sh b/components/9990-misc-helpers.sh
index 9318a4b..e58f283 100755
--- a/components/9990-misc-helpers.sh
+++ b/components/9990-misc-helpers.sh
@@ -1313,13 +1313,20 @@ do_union ()
then
panic "overlay needs at least one lower filesystem (read-only branch)."
fi
- # overlayfs requires:
- # + a workdir to become mounted
- # + workdir and upperdir to reside under the same mount
- # + workdir and upperdir to be in separate directories
- mkdir "${unionrw}/rw"
- mkdir "${unionrw}/work"
- unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}/rw,workdir=${unionrw}/work"
+ unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}"
+ if ! mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}" 2>/dev/null
+ then
+ # Ref: kiwi from OpenSuse kiwi-7.02.18-1.1
+ # overlayfs in version >= v22 behaves differently
+ # + renamed from overlayfs to overlay
+ # + requires a workdir to become mounted
+ # + requires workdir and upperdir to reside under the same mount
+ # + requires workdir and upperdir to be in separate subdirs
+ mkdir ${unionrw}/rw
+ mkdir ${unionrw}/work
+ unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}/rw,workdir=${unionrw}/work"
+ mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}"
+ fi
;;
esac