+ ;;
+
+ overlay)
+ # XXX: can unionro be optional? i.e. can overlay skip lowerdir?
+ if [ -z "${unionro}" ]
+ then
+ panic "overlay needs at least one lower filesystem (read-only branch)."
+ fi
+ # Multiple lower layers can now be given using the the colon (":") as a
+ # separator character between the directory names.
+ unionro="$(echo ${unionro} | sed -e 's| |:|g')"
+ # 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"