summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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