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>
--- /dev/null
+# 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
--- /dev/null
+[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
--- /dev/null
+# 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
--- /dev/null
+[Unit]
+Description=Platform restart without Kernel rebooting
+DefaultDependencies=no
+Requires=platform-restart.service
+After=platform-restart.service
+AllowIsolate=yes
--- /dev/null
+# 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
--- /dev/null
+[Unit]
+Description=Custom action script for platform restart
+DefaultDependencies=no
+After=cleanup-tmp.service
+Before=do-return.service