summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/initscripts')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 22a71ecaae..35316ec2ba 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -25,8 +25,18 @@ COREDEF="00_core"
25[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems." 25[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
26 26
27create_file() { 27create_file() {
28 EXEC=""
29 [ -z "$2" ] && {
30 EXEC="
31 touch \"$1\";
32 "
33 } || {
34 EXEC="
35 cp \"$2\" \"$1\";
36 "
37 }
28 EXEC=" 38 EXEC="
29 touch \"$1\"; 39 ${EXEC}
30 chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1; 40 chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
31 chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 " 41 chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
32 42
@@ -187,7 +197,9 @@ apply_cfgfile() {
187 197
188 case "${TTYPE}" in 198 case "${TTYPE}" in
189 "f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-." 199 "f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
190 create_file "${TNAME}" 200 TSOURCE="$TLTARGET"
201 [ "${TSOURCE}" = "none" ] && TSOURCE=""
202 create_file "${TNAME}" "${TSOURCE}" &
191 ;; 203 ;;
192 "d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-." 204 "d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
193 mk_dir "${TNAME}" 205 mk_dir "${TNAME}"