From f8695a0d8d0a7067aae3822a9f00aa8708cfa412 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 25 Feb 2010 11:51:55 -0800 Subject: [PATCH] Allow setting of overlay at install time --- setup.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 7e950b8b9..0b6b43482 100755 --- a/setup.sh +++ b/setup.sh @@ -696,8 +696,21 @@ fi oldthemeline=`grep "^theme=" $config_dir/config` oldtheme=`echo $oldthemeline | sed -e 's/theme=//g'` if [ "$theme" != "" ] && [ "$oldthemeline" = "" ] && [ -d "$wadir/$theme" ]; then - echo "theme=$theme" >> $config_dir/config - echo "preroot=$theme" >> $config_dir/miniserv.conf + themelist=$theme +fi + +# Set a special overlay if none was set before +if [ "$overlay" = "" ]; then + overlay=`cat "$wadir/defaultoverlay" 2>/dev/null` +fi +if [ "$overlay" != "" ] && [ "$theme" != "" ] && [ -d "$wadir/$overlay" ]; then + themelist="$themelist $overlay" +fi + +# Apply the theme and maybe overlay +if [ "$themelist" != "" ]; then + echo "theme=$themelist" >> $config_dir/config + echo "preroot=$themelist" >> $config_dir/miniserv.conf fi # Set the product field in the global config