X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=78608b64fef85df2d15597f44d8b95c56c0e2c91;hb=abb42266f7e2251fd0e9cc14dc76ec6290e4b4b9;hp=442f7499b0e4ef81b41f312736d366a4664d840e;hpb=642591226c57f1902e6d159c0dea5bbee2afc572;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index 442f749..78608b6 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -1357,6 +1357,11 @@ activate_custom_mounts () esac done + if [ -n "${opt_linkfiles}" ] && [ -n "${opt_union}" ] + then + log_warning_msg "Skipping custom mount ${dest} with options ${options}: \"linkfiles\" and \"union\" are mutually exclusive options" + fi + if [ -n "$(what_is_mounted_on "${dest}")" ] then log_warning_msg "Skipping custom mount ${source} on ${dest}: $(what_is_mounted_on "${dest}") is already mounted there" @@ -1398,13 +1403,16 @@ activate_custom_mounts () # dealing with /etc or other system dir. if [ ! -d "${source}" ] then - if [ -n "${PERSISTENT_READONLY}" ] || [ -n "${opt_linkfiles}" ] + if [ -n "${PERSISTENT_READONLY}" ] then continue - elif [ -n "${opt_union}" ] + elif [ -n "${opt_union}" ] || [ -n "${opt_linkfiles}" ] then - # union's don't need to be bootstrapped + # unions and don't need to be bootstrapped + # linkfiles dirs can't be bootstrapped in a sensible way mkdir "${source}" + chown --reference "${dest}" "${source}" + chmod --reference "${dest}" "${source}" else # ensure that $dest is not copied *into* $source mkdir -p "$(dirname ${source})" @@ -1412,6 +1420,8 @@ activate_custom_mounts () fi fi + # XXX: If CONFIG_AUFS_ROBR is added to the Debian kernel we can + # ignore the loop below and set rofs_dest_backing=$dest rofs_dest_backing="" for d in ${rootmnt}/live/rofs/* do