package: launch script within the current process 51/130851/1
authorJinhyung Choi <jinh0.choi@samsung.com>
Wed, 24 May 2017 07:28:02 +0000 (16:28 +0900)
committerJinhyung Choi <jinh0.choi@samsung.com>
Wed, 24 May 2017 07:28:02 +0000 (16:28 +0900)
Change-Id: I497fbd601862fe204dc95cdd61facd6b6c4a59d4
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
src/package.cpp

index 2b8f5c56f3b51526a237c9e11682122f5101c5e5..c6e81c3272c3af5a028d66c44d266f242b674faf 100644 (file)
@@ -122,6 +122,7 @@ static void run_script(char* addon)
 {
     int ret = -1;
     char file_name[MAX_PKGS_BUF];
+    char launch_buf[MAX_PKGS_BUF + 2];
 
     snprintf(file_name, sizeof(file_name), "%s%s/%s", PATH_PACKAGE_INSTALL, addon, SCRIPT_INSTALL);
     ret = access(file_name, F_OK);
@@ -137,7 +138,10 @@ static void run_script(char* addon)
         LOGWARN("[RunScript] file permission setting is failed : [%d] %s", ret, file_name);
         return;
     }
-    systemcall(file_name);
+
+    snprintf(launch_buf, sizeof(launch_buf), ". %s", file_name);
+
+    systemcall(launch_buf);
 }
 
 static bool do_package(int action, char* data)