From: Krzysztof Opasiak Date: Thu, 18 Apr 2013 07:29:53 +0000 (+0200) Subject: packaging-RSA: Import platform restart from RSA X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42b96ffacb83576366934fdfa7849e822a65e81c;p=platform%2Fupstream%2Fsystemd.git packaging-RSA: Import platform restart from RSA Platform restart functionality patch reorganized. Previous patch made by Sangjung Woo 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 --- diff --git a/platform_restart/cleanup-tmp.service b/platform_restart/cleanup-tmp.service new file mode 100644 index 0000000..7509754 --- /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 0000000..fe9675d --- /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 0000000..f5b0b3f --- /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 0000000..46b9e5c --- /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 0000000..64c4eca --- /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 0000000..8236058 --- /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