summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2013-04-18 09:29:53 +0200
committerƁukasz Stelmach <l.stelmach@samsung.com>2014-04-11 14:41:51 +0200
commitdb2d8ed723374340a4408311a253a87324394e3b (patch)
tree264f1495ae14e83e654fbe2ded0e95bf1bd4f4d8
parent2d89c872d48b6f8316cb22851983d77ced918230 (diff)
downloadsystemd-db2d8ed723374340a4408311a253a87324394e3b.tar.gz
systemd-db2d8ed723374340a4408311a253a87324394e3b.tar.bz2
systemd-db2d8ed723374340a4408311a253a87324394e3b.zip
[systemd upgrade] Import platform restart from RSA
Platform restart functionality patch reorganized. Previous patch made by Sangjung Woo <sangjung.woo@samsung.com> had to be reorganized to ensure that it may be applied on any systemd version. Now it is applied without modifying any systemd files (ex. Makefile). Change-Id: I187f05c24f3e8267a9e88c11a0a9ca84a6ae7d71 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
-rw-r--r--platform_restart/cleanup-tmp.service14
-rw-r--r--platform_restart/do-return.service12
-rw-r--r--platform_restart/platform-restart.service12
-rw-r--r--platform_restart/platform-restart.target6
-rw-r--r--platform_restart/pr-action.target11
-rw-r--r--platform_restart/pr-custom.target5
6 files changed, 60 insertions, 0 deletions
diff --git a/platform_restart/cleanup-tmp.service b/platform_restart/cleanup-tmp.service
new file mode 100644
index 0000000000..7509754883
--- /dev/null
+++ b/platform_restart/cleanup-tmp.service
@@ -0,0 +1,14 @@
+# This file is for platform restart of Tizen
+
+[Unit]
+Description=Clean up temporary directory
+DefaultDependencies=no
+Before=pr-action.target pr-custom.target do-return.service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/umount /tmp
+ExecStart=/bin/mount /tmp
+
+[Install]
+WantedBy=pr-action.target
diff --git a/platform_restart/do-return.service b/platform_restart/do-return.service
new file mode 100644
index 0000000000..fe9675d36c
--- /dev/null
+++ b/platform_restart/do-return.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Re-run system daemon
+DefaultDependencies=no
+After=pr-custom.target
+Before=pr-action.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/systemctl default
+
+[Install]
+WantedBy=pr-action.target
diff --git a/platform_restart/platform-restart.service b/platform_restart/platform-restart.service
new file mode 100644
index 0000000000..f5b0b3f91e
--- /dev/null
+++ b/platform_restart/platform-restart.service
@@ -0,0 +1,12 @@
+# This file is the main service file of platform restart.
+#
+[Unit]
+Description=Platform restart main service
+DefaultDependencies=no
+Requires=shutdown.target
+After=shutdown.target
+
+[Service]
+Type=oneshot
+StandardOutput=kmsg
+ExecStart=/usr/bin/systemctl isolate pr-action.target
diff --git a/platform_restart/platform-restart.target b/platform_restart/platform-restart.target
new file mode 100644
index 0000000000..46b9e5cd6c
--- /dev/null
+++ b/platform_restart/platform-restart.target
@@ -0,0 +1,6 @@
+[Unit]
+Description=Platform restart without Kernel rebooting
+DefaultDependencies=no
+Requires=platform-restart.service
+After=platform-restart.service
+AllowIsolate=yes
diff --git a/platform_restart/pr-action.target b/platform_restart/pr-action.target
new file mode 100644
index 0000000000..64c4ecae38
--- /dev/null
+++ b/platform_restart/pr-action.target
@@ -0,0 +1,11 @@
+# This file is for platform-restart action target
+#
+# This target do something as belows
+# - Clean the '/tmp' directory
+# - Run 'pr-custom.target'
+# - Re-run all Tizen service daemons
+
+[Unit]
+Description=Platform-restart action
+DefaultDependencies=no
+AllowIsolate=yes
diff --git a/platform_restart/pr-custom.target b/platform_restart/pr-custom.target
new file mode 100644
index 0000000000..8236058316
--- /dev/null
+++ b/platform_restart/pr-custom.target
@@ -0,0 +1,5 @@
+[Unit]
+Description=Custom action script for platform restart
+DefaultDependencies=no
+After=cleanup-tmp.service
+Before=do-return.service