busybox: create system config file to use with our init scripts

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-03-11 22:19:52 +01:00
parent 8f10d83337
commit 1bf39de9c4

View File

@ -23,19 +23,28 @@
# #
# runlevels: openelec, textmode # runlevels: openelec, textmode
progress "copy userconfig and samples" OPENELEC_SETTINGS="$HOME/.xbmc/userdata/addon_data/os.openelec.settings/settings.xml"
if [ -d /usr/config ]; then if [ -d /usr/config ]; then
cd /usr/config progress "copy userconfig and samples"
$IONICE mkdir -p /storage/.config
for dir in `find . -type d`; do cd /usr/config
mkdir -p /storage/.config/$dir mkdir -p /storage/.config
done
for file in `find . -type f`; do for dir in `find . -type d`; do
if [ ! -f /storage/.config/$file ]; then mkdir -p /storage/.config/$dir
cp $file /storage/.config/$file done
fi
done for file in `find . -type f`; do
if [ ! -f /storage/.config/$file ]; then
cp $file /storage/.config/$file
fi
done
fi
if [ -f "$OPENELEC_SETTINGS" ]; then
progress "creating system settings"
mkdir -p /var/config
cat "$OPENELEC_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/settings.conf
fi fi