From 38302a9597498d3efc7612cc21c5b354212acc70 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 13 Apr 2010 16:10:16 +0200 Subject: [PATCH] busybox: - rework of userconfig script --- packages/sysutils/busybox/init.d/07_userconfig | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/sysutils/busybox/init.d/07_userconfig b/packages/sysutils/busybox/init.d/07_userconfig index e7b0d50a58..4240a9a042 100755 --- a/packages/sysutils/busybox/init.d/07_userconfig +++ b/packages/sysutils/busybox/init.d/07_userconfig @@ -4,5 +4,18 @@ # runlevels: openelec, textmode progress "copy userconfig and samples" + +if [ -d /usr/config ]; then + cd /usr/config $IONICE mkdir -p /storage/.config - $IONICE cp -Rn /usr/config/* /storage/.config + + for dir in `find . -type d`; do + mkdir -p /storage/.config/$dir + done + + for file in `find . -type f`; do + if [ ! -f /storage/.config/$file ]; then + cp $file /storage/.config/$file + fi + done +fi