corrected target suite in changelog
[rrq/overlay-boot.git] / functions
index bc65448082cb4c697df37d2d6f8e82f2bc5a5a4f..e9111fe08e9c72e6640a7cca20dfe1e1f88b9449 100644 (file)
--- a/functions
+++ b/functions
@@ -11,6 +11,10 @@ die() {
     exit 1
 }
 
+beginswith() {
+    [ "$1" != "${1#$2}" ]
+}
+
 # Function to setup subhost name and log file
 subhost_name() {
     CONFIG="$1"
@@ -150,6 +154,17 @@ setup_overlay() {
        mount --bind $UPPER $LOWER
     fi
 
+    grep ^SHARE= "$CONFIG" | while read A ; do
+        B="$(echo ${A#SHARE=})"
+        D="$(realpath "$LOWER$B")"
+        [ "$D" = "$LOWER" ] && continue
+        if [ -d "$D" ] ; then
+            echo bind mount $D onto $LIVE$D
+            mkdir -p $LIVE$D
+            mount --bind $D $LIVE$D
+        fi
+    done
+
     env CONFIG="$CONFIG" $POSTMOUNT "LIVE" "$UPPER" 
 }