From 9ae0ded830f614ae7c51449a3a97ab453398e722 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Mon, 10 Mar 2008 21:30:26 +0000 Subject: [PATCH] Improved overlay_apply() to support D_foodir macros on the content of .txt and .sh/.exec files and on the target of the .ln files --- lib/overlay/overlay-functions.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/overlay/overlay-functions.in b/lib/overlay/overlay-functions.in index 38f98b4..bda6214 100644 --- a/lib/overlay/overlay-functions.in +++ b/lib/overlay/overlay-functions.in @@ -62,11 +62,11 @@ overlay_apply() { exec|txt) echo_status "injecting $target ($type)" mkdir -p "$targetdir" - [ ! -e "$rootfs/$target" ] || rm -f "$rootfs/$target" - cp -f "$file" "$rootfs/$target" + [ ! -L "$rootfs/$target" ] || rm -f "$rootfs/$target" + cat "$file" | rock_substitute > "$rootfs/$target" chmod $mode "$rootfs/$target" ;; - ln) ref=$( cat "$file" ) + ln) ref=$( cat "$file" | rock_substitute ) echo_status "injecting $target -> $ref" mkdir -p "$targetdir" ln -snf "$ref" "$rootfs/$target"