prerun: skip and inform if there is not model-config.sh 07/52407/2
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 30 Jun 2015 03:00:32 +0000 (12:00 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Mon, 23 Nov 2015 12:02:18 +0000 (21:02 +0900)
Change-Id: I534c47517ee7f10e3b7d7766d2a22d3e3f6b29f2
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
(cherry picked from commit 467456149148eb87d716152ec992993ef1266536)

filesystem/etc/emulator/prerun.d/set-model-config.sh

index c8db2a628ff665cc3c29f74a9f3cce39eb4e4644..90d12e6ba287b93238570494903cd94def64a266 100644 (file)
@@ -10,6 +10,11 @@ XML=$NEW_ROOT/etc/config/model-config.xml
 
 echo -e "*** Setting model-config.xml"
 
+if [ ! -f $XML ] ; then
+    echo -e "- model-config.xml does not exist"
+    exit
+fi
+
 # display resolution
 if grep -q "video=" $CMDLINE ; then
         VIDEO=`sed s/.*video=// $CMDLINE | cut -d ' ' -f1`
@@ -20,7 +25,7 @@ if grep -q "video=" $CMDLINE ; then
 
         TR_NUM=`echo $WIDTH$HEIGHT | tr -d '[0-9]'`
         if [ "$TR_NUM" != "" ] ; then
-            echo "non-integer argument"
+            echo -e "- resolution value is non-integer argument"
         else
             WIDTH_KEY="tizen.org\/feature\/screen.width\" type=\"int\""
             sed -i s/"$WIDTH_KEY".*\</"$WIDTH_KEY"\>"$WIDTH"\</ $XML
@@ -45,7 +50,7 @@ if grep -q "dpi=" $CMDLINE ; then
 
         TR_NUM=`echo $DPI | tr -d '[0-9]'`
         if [ "$TR_NUM" != "" ] ; then
-            echo "non-integer argument"
+            echo -e "- dpi value is non-integer argument"
         else
             SCREEN_DPI=`expr "$DPI" "/" 10`