summaryrefslogtreecommitdiffstats
path: root/hooks/sleep
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-02-22 18:49:02 +0100
committerThomas Bächler <thomas@archlinux.org>2010-02-22 18:49:02 +0100
commitd5625e4bd28a9b3066777c539b05aef3fc551b8f (patch)
tree566bfcb47e7d9bf4a3955df4f4a3fd782b765e83 /hooks/sleep
parent2f5b51af04f7229da2ff7fc3c07c8d2fe5c3a306 (diff)
downloadmkinitcpio-d5625e4bd28a9b3066777c539b05aef3fc551b8f.tar.gz
mkinitcpio-d5625e4bd28a9b3066777c539b05aef3fc551b8f.tar.xz
Add 'sleep' hook
Diffstat (limited to 'hooks/sleep')
-rw-r--r--hooks/sleep9
1 files changed, 9 insertions, 0 deletions
diff --git a/hooks/sleep b/hooks/sleep
new file mode 100644
index 0000000..bade71a
--- /dev/null
+++ b/hooks/sleep
@@ -0,0 +1,9 @@
+# vim:set ft=sh:
+run_hook ()
+{
+ if [ -z "${sleeptime}" ] || ! [ "${sleeptime}" -gt 0 ]; then
+ sleeptime=5
+ fi
+ msg "Sleeping for ${sleeptime} seconds."
+ sleep ${sleeptime}
+}