From fcd270cef75d6b15c09372a0a3ba9b95cc13031a Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 29 Jul 2011 23:49:36 +0200 Subject: [PATCH] busybox: overwrite sample files on boot to have the latest version, keep configs untouched Signed-off-by: Stephan Raue --- packages/sysutils/busybox/init.d/04_userconfig | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/sysutils/busybox/init.d/04_userconfig b/packages/sysutils/busybox/init.d/04_userconfig index 5ad727d68e..a9dc70dd55 100644 --- a/packages/sysutils/busybox/init.d/04_userconfig +++ b/packages/sysutils/busybox/init.d/04_userconfig @@ -33,9 +33,13 @@ if [ -d /usr/config ]; then mkdir -p /storage/.config/$dir done - for file in `find . -type f`; do - if [ ! -f /storage/.config/$file ]; then - cp $file /storage/.config/$file + for config in `find . -type f -name "*.conf"`; do + if [ ! -f /storage/.config/$config ]; then + cp $config /storage/.config/$config fi done + + for sample in `find . -type f -name "*.sample"`; do + cp $sample /storage/.config/$sample + done fi