summaryrefslogtreecommitdiff
path: root/components/9990-misc-helpers.sh
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2015-02-15 17:24:39 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-04-28 06:53:28 +0200
commitd1d4af9b25661d047a3c5a739b5d1e991a863d88 (patch)
treeb4714ca61b5c2138dbf8025d578dfd3c57c5abd9 /components/9990-misc-helpers.sh
parent8bb7633a1b25fd465d015119d6f15a159f68b8dd (diff)
downloadlive-boot-d1d4af9b25661d047a3c5a739b5d1e991a863d88.tar.gz
live-boot-d1d4af9b25661d047a3c5a739b5d1e991a863d88.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/9990-misc-helpers.sh')
-rwxr-xr-xcomponents/9990-misc-helpers.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/components/9990-misc-helpers.sh b/components/9990-misc-helpers.sh
index 87c4930..315e3b1 100755
--- a/components/9990-misc-helpers.sh
+++ b/components/9990-misc-helpers.sh
@@ -1318,7 +1318,19 @@ do_union ()
panic "overlay needs at least one lower filesystem (read-only branch)."
fi
unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}"
- mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}"
+ 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
}