Disabled OOM killing for SDBD process on TV profile 75/74875/2 accepted/tizen/common/20160616.151856 accepted/tizen/ivi/20160617.081610 accepted/tizen/mobile/20160617.081208 accepted/tizen/tv/20160617.081318 accepted/tizen/wearable/20160617.081356 submit/tizen/20160616.053644
authorshingil.kang <shingil.kang@samsung.com>
Thu, 16 Jun 2016 02:57:30 +0000 (11:57 +0900)
committershingil.kang <shingil.kang@samsung.com>
Thu, 16 Jun 2016 04:48:14 +0000 (13:48 +0900)
Change-Id: I721285019b58a7f2d1004bac25c52606aa3d3738
Signed-off-by: shingil.kang <shingil.kang@samsung.com>
packaging/sdbd.spec
packaging/sdbd_device_tv.service [new file with mode: 0644]
packaging/sdbd_emulator_tv.service [new file with mode: 0644]

index 6a3da0b7fae7210b19b7935bbca1e8acb62d83dc..e8539f87c1615913e21981ed22209506f4c4d159 100644 (file)
@@ -12,6 +12,8 @@ Source1001:    sdbd_device.service
 Source1002:    sdbd_emulator.service
 Source1003:    %{name}.manifest
 Source1004:    sdbd_tcp.service
+Source1005:    sdbd_device_tv.service
+Source1006:    sdbd_emulator_tv.service
 
 BuildRequires: capi-system-info-devel >= 0.2.0
 BuildRequires: cmake >= 2.8.3
@@ -57,12 +59,22 @@ cp LICENSE %{buildroot}/usr/share/license/%{name}
 %make_install
 mkdir -p %{buildroot}%{_libdir}/systemd/system
 mkdir -p %{buildroot}%{_unitdir}
+
 %ifarch %{ix86}
+%if "%{profile}" == "tv"
+install -m 0644 %SOURCE1006 %{buildroot}%{_libdir}/systemd/system/sdbd.service
+%else
 install -m 0644 %SOURCE1002 %{buildroot}%{_libdir}/systemd/system/sdbd.service
+%endif
 mkdir -p %{buildroot}/%{_libdir}/systemd/system/emulator_preinit.target.wants
 ln -s %{_libdir}/systemd/system/sdbd.service %{buildroot}/%{_libdir}/systemd/system/emulator_preinit.target.wants/
+
+%else
+%if "%{profile}" == "tv"
+install -m 0644 %SOURCE1005 %{buildroot}%{_unitdir}/sdbd.service
 %else
 install -m 0644 %SOURCE1001 %{buildroot}%{_unitdir}/sdbd.service
+%endif
 install -m 0644 %SOURCE1004 %{buildroot}%{_unitdir}/sdbd_tcp.service
 mkdir -p %{buildroot}/%{_libdir}/systemd/system/multi-user.target.wants
 ln -s %{_libdir}/systemd/system/sdbd.service %{buildroot}/%{_libdir}/systemd/system/multi-user.target.wants/
diff --git a/packaging/sdbd_device_tv.service b/packaging/sdbd_device_tv.service
new file mode 100644 (file)
index 0000000..fe3c965
--- /dev/null
@@ -0,0 +1,17 @@
+[Unit]
+Description=sdbd
+Requires=tizen-system-env.service
+After=tmp.mount
+
+[Service]
+Type=forking
+#location of SDBD log file
+#Environment=SDBD_LOG_PATH=/tmp
+EnvironmentFile=-/run/tizen-system-env
+OOMScoreAdjust=-1000
+PIDFile=/tmp/.sdbd.pid
+Restart=on-failure
+ExecStart=/usr/sbin/sdbd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/packaging/sdbd_emulator_tv.service b/packaging/sdbd_emulator_tv.service
new file mode 100644 (file)
index 0000000..4d81fd2
--- /dev/null
@@ -0,0 +1,20 @@
+[Unit]
+Description=sdbd
+Before=sensord.service
+After=tmp.mount dbus.service
+#DefaultDependencies=false
+
+[Service]
+Type=forking
+#location of SDBD log file
+#Environment=SDBD_LOG_PATH=/tmp
+Environment=DISPLAY=:0
+PIDFile=/tmp/.sdbd.pid
+RemainAfterExit=yes
+OOMScoreAdjust=-1000
+#ExecStartPre=/bin/bash -c "/bin/echo '10.0.2.15/32 system::debugging_network' >> /smack/netlabel"
+ExecStart=/bin/sh -c "/usr/sbin/sdbd `/usr/bin/awk '{match($0, /sdb_port=([0-9]+)/,port_match); match($0, /vm_name=([^, ]*)/,vm_match); print \"--emulator=\" vm_match[1] \":\" port_match[1] \" --connect-to=10.0.2.2:26099\" \" --sensors=10.0.2.2:\"port_match[1]+3 }' /proc/cmdline`"
+
+[Install]
+WantedBy=emulator_preinit.target
+