summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2012-10-16 21:28:45 +0200
committerChristian Ruppert <idl0r@gentoo.org>2012-10-16 21:28:45 +0200
commita3ff6cce97d2437438a955c781267df1f4f49bcd (patch)
tree5ec5cd467b0ab4ddb56951c336ffe5c4ccb72948
parent1e7c696ea4fb56f36c55bec0af1017a6d4a4fc65 (diff)
downloadopenrc-a3ff6cce97d2437438a955c781267df1f4f49bcd.tar.gz
openrc-a3ff6cce97d2437438a955c781267df1f4f49bcd.tar.bz2
openrc-a3ff6cce97d2437438a955c781267df1f4f49bcd.tar.xz
Revert "Prepare for real "restart" support"
This reverts commit c5bb6829d00a4034f7294aa4af79d5d114572ac1. That was meant for my local devel branch :)
-rw-r--r--man/runscript.89
1 files changed, 9 insertions, 0 deletions
diff --git a/man/runscript.8 b/man/runscript.8
index 4c8c985..044bef7 100644
--- a/man/runscript.8
+++ b/man/runscript.8
@@ -454,6 +454,15 @@ depend()
# This also applies to start_post, stop_pre and stop_post.
start_pre()
{
+ if [ "$RC_CMD" = restart ]; then
+ # This block will only execute for a restart command. Use a
+ # structure like this if you need special processing for a
+ # restart which you do not need for a normal start.
+ # The function can also fail from here, which will mean that a
+ # restart can fail.
+ # This logic can also be used in start_post, stop_pre and
+ # stop_post.
+ fi
# Ensure that our dirs are correct
checkpath --dir --owner foo:foo --mode 0664 \\
/var/run/foo /var/cache/foo