diff options
author | Kunhoon Baik <knhoon.baik@samsung.com> | 2016-11-17 16:26:34 +0900 |
---|---|---|
committer | Kunhoon Baik <knhoon.baik@samsung.com> | 2016-11-18 13:32:19 +0900 |
commit | 5054878c415b21ba818869394aea9fbe0bcdfdf3 (patch) | |
tree | e8fa26fda40d7bc9aca47baff4d8d2c029a4874f /packaging/system-plugin.spec | |
parent | 863335a0dec22abbc9d2444e9031db15b6822707 (diff) | |
download | system-plugin-5054878c415b21ba818869394aea9fbe0bcdfdf3.tar.gz system-plugin-5054878c415b21ba818869394aea9fbe0bcdfdf3.tar.bz2 system-plugin-5054878c415b21ba818869394aea9fbe0bcdfdf3.zip |
Change MainPID of user@servicesubmit/tizen_3.0/20161118.041243accepted/tizen/3.0/wearable/20161122.124227accepted/tizen/3.0/tv/20161122.124213accepted/tizen/3.0/mobile/20161122.124143accepted/tizen/3.0/ivi/20161122.124236accepted/tizen/3.0/common/20161122.195027
systemd-user-helper helps to launch systemd user session.
Thus, MainPID should be changed to systemd user session for keeping original behavior like stop operation.
This patch changes the MainPID to systemd user session by using pidfile and forking type.
Change-Id: Id8dc3daa71c18914b79e218043705fe5e167d14f
Diffstat (limited to 'packaging/system-plugin.spec')
-rw-r--r-- | packaging/system-plugin.spec | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index 3622003..13684a2 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -308,12 +308,13 @@ mv %{_sysconfdir}/fstab_lazymnt %{_sysconfdir}/fstab %manifest systemd-user-helper.manifest %caps(cap_sys_admin,cap_mac_admin,cap_mac_override,cap_dac_override,cap_setgid=ei) %{_bindir}/systemd_user_helper +#TODO: when uninstalling, it should be restored to original file %posttrans -n systemd-user-helper cp -a /usr/lib/systemd/system/user\@.service /usr/lib/systemd/system/__user@.service -/usr/bin/sed -i -e 's/Type=\(.*\)/Type=simple/' /usr/lib/systemd/system/user\@.service +/usr/bin/sed -i -e 's/Type=\(.*\)/Type=forking/' /usr/lib/systemd/system/user\@.service /usr/bin/sed -i -e 's/ExecStart=\(.*\)/ExecStart=\/usr\/bin\/systemd_user_helper %i/' /usr/lib/systemd/system/user\@.service -/usr/bin/sed -i -e '/RemainAfterExit=\(.*\)/d' /usr/lib/systemd/system/user\@.service -echo 'RemainAfterExit=yes' >> /usr/lib/systemd/system/user\@.service +/usr/bin/sed -i -e '/PIDFile=\(.*\)/d' /usr/lib/systemd/system/user\@.service +echo 'PIDFile=/run/user/%i/.systemd.pid' >> /usr/lib/systemd/system/user\@.service %files profile_ivi %{_prefix}/lib/udev/rules.d/99-usb-ethernet.rules |