add author and revdate
[rrq/overlay-boot.git] / functions
index ddcd97dd99fe7f4ed85ab93ec03694216faf5a9a..2fa68ccf2de35cad8232b355ab57f6a849d1fcb2 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"
@@ -152,12 +156,12 @@ setup_overlay() {
 
     grep ^SHARE= "$CONFIG" | while read A ; do
         B="$(echo ${A#SHARE=})"
-        D="$(realpath "$LOWER$B")"
+        D="$(realpath "$B")"
         [ "$D" = "$LOWER" ] && continue
         if [ -d "$D" ] ; then
-            echo bind mount $D onto $LIVE$D
+            echo bind mount $D onto $LIVE$B
             mkdir -p $LIVE$D
-            mount --bind $D $LIVE$D
+            mount --bind $D $LIVE$B
         fi
     done