Removing dependency of tizen-debug-on/off service from sys-assert 28/123228/2 accepted/tizen/unified/20170426.061702 submit/tizen/20170425.080615
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Mon, 24 Apr 2017 15:34:18 +0000 (17:34 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Mon, 24 Apr 2017 15:40:31 +0000 (17:40 +0200)
Tizen-debug-on/off service should control enabling/disabling coredump generation.
When Tizen-debug-off service is executed, only callstack should be generated.

Thus, although disabling sys-assert, the services should be remained.

TODO : For disabling sys-assert, the services should be changed properly.

Change-Id: I617356cd31b51dbe4f103cb3118fefe454e717db

CMakeLists.txt
data/CMakeLists.txt [new file with mode: 0644]
data/tizen-debug-off.service [new file with mode: 0644]
data/tizen-debug-on.service [new file with mode: 0644]
src/sys-assert/CMakeLists.txt
src/sys-assert/tizen-debug-off.service [deleted file]
src/sys-assert/tizen-debug-on.service [deleted file]

index a3ca59d3b6cafb42116224eaf9911d4ab3d36711..6982d2607574a62846e18e665211db80b4399803 100644 (file)
@@ -17,5 +17,6 @@ ENDIF()
 
 ADD_SUBDIRECTORY(src/dump_systemstate)
 ADD_SUBDIRECTORY(src/log_dump)
+ADD_SUBDIRECTORY(data)
 ADD_SUBDIRECTORY(tests)
 
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644 (file)
index 0000000..91a31e5
--- /dev/null
@@ -0,0 +1,7 @@
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tizen-debug-on.service DESTINATION /usr/lib/systemd/system
+        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
+        GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tizen-debug-off.service DESTINATION /usr/lib/systemd/system
+        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
+        GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
diff --git a/data/tizen-debug-off.service b/data/tizen-debug-off.service
new file mode 100644 (file)
index 0000000..870964e
--- /dev/null
@@ -0,0 +1,15 @@
+[Unit]
+Description=tizen debug off
+DefaultDependencies=no
+After=opt.mount tizen-debug-on.service
+Before=sysinit.target
+
+[Service]
+SmackProcessLabel=System
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/rm -f /opt/etc/.debugmode
+ExecStart=/sbin/sysctl kernel.core_pattern=/dev/null
+
+[Install]
+WantedBy=sysinit.target
diff --git a/data/tizen-debug-on.service b/data/tizen-debug-on.service
new file mode 100644 (file)
index 0000000..22ae97a
--- /dev/null
@@ -0,0 +1,15 @@
+[Unit]
+Description=tizen debug on
+DefaultDependencies=no
+After=opt.mount
+Before=sysinit.target
+
+[Service]
+SmackProcessLabel=System
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/touch -f /opt/etc/.debugmode
+ExecStart=/sbin/sysctl -p /usr/lib/sysctl.d/99-crash-manager.conf
+
+[Install]
+WantedBy=sysinit.target
index e6c7ca0a6283f8fab5550a8b46eaf625df765fa4..99d3383a4078d90f37c15d4c1ef5cbab5772cd9d 100644 (file)
@@ -62,11 +62,3 @@ INSTALL(TARGETS ${LIBNAME} LIBRARY DESTINATION ${LIB_INSTALL_DIR})
 
 CONFIGURE_FILE(sys-assert.conf.in sys-assert.conf)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/sys-assert.conf DESTINATION ${TMP_FILES_DIR})
-
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tizen-debug-on.service DESTINATION /usr/lib/systemd/system
-        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
-        GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
-
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tizen-debug-off.service DESTINATION /usr/lib/systemd/system
-        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
-        GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
\ No newline at end of file
diff --git a/src/sys-assert/tizen-debug-off.service b/src/sys-assert/tizen-debug-off.service
deleted file mode 100644 (file)
index 870964e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=tizen debug off
-DefaultDependencies=no
-After=opt.mount tizen-debug-on.service
-Before=sysinit.target
-
-[Service]
-SmackProcessLabel=System
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/bin/rm -f /opt/etc/.debugmode
-ExecStart=/sbin/sysctl kernel.core_pattern=/dev/null
-
-[Install]
-WantedBy=sysinit.target
diff --git a/src/sys-assert/tizen-debug-on.service b/src/sys-assert/tizen-debug-on.service
deleted file mode 100644 (file)
index 22ae97a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=tizen debug on
-DefaultDependencies=no
-After=opt.mount
-Before=sysinit.target
-
-[Service]
-SmackProcessLabel=System
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/bin/touch -f /opt/etc/.debugmode
-ExecStart=/sbin/sysctl -p /usr/lib/sysctl.d/99-crash-manager.conf
-
-[Install]
-WantedBy=sysinit.target