Add masking systemd user unit in zone : starter.service 09/65309/6 accepted/tizen/common/20160411.130353 accepted/tizen/ivi/20160411.100107 accepted/tizen/mobile/20160411.100119 accepted/tizen/tv/20160411.100104 accepted/tizen/wearable/20160411.100047 submit/tizen/20160411.081633
authorSungbae Yoo <sungbae.yoo@samsung.com>
Fri, 8 Apr 2016 09:08:59 +0000 (18:08 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Mon, 11 Apr 2016 06:30:59 +0000 (15:30 +0900)
Change-Id: If98e87ba23d81981b3b7ef23e65e35b722072b3a
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
server/zone.cpp

index 7f333cf..462f8c3 100644 (file)
@@ -233,6 +233,13 @@ int Zone::createZone(const std::string& name, const std::string& setupWizAppid)
             runtime::File systemdUserUnit(homeDir + "/.config/systemd/user");
             systemdUserUnit.makeDirectory(true);
 
+            //mask systemd user unit
+            ret = ::symlink("/dev/null",
+                      (systemdUserUnit.getPath() + "/starter.service").c_str());
+
+           if (ret != 0)
+               throw runtime::Exception("Failed to mask starter.service");
+
             //initialize package db
             execute("/usr/bin/pkg_initdb",
                     "pkg_initdb", std::to_string(user.getUid()));