summaryrefslogtreecommitdiff
blob: 5c887185e1ec032643cb5a4b092e887488489a9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Gentoo layout.

--- init.d/hibernate-cleanup.sh.org	2007-05-04 07:17:40.000000000 +0300
+++ init.d/hibernate-cleanup.sh	2007-05-04 07:22:25.000000000 +0300
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/sbin/runscript
 
 # This script invalidates any stale swsusp and Software Suspend 2 images. It
 # searches all swap partitions on your machine, as well as Suspend2's
@@ -78,27 +78,30 @@ do_reload() {
 
 
 msg_status() {
-	echo -n "$1"
+	einfon "$1"
 }
 
 msg() {
-	echo "$1"
+	einfo "$1"
 }
 
-case "$1" in
-start)
-	msg_status "Invalidating stale software suspend images... "
+opts="reload"
+
+depend() {
+	after modules
+	before localmount
+}
+
+start() {
+	ebegin "Invalidating stale software suspend images"
 	do_start
-	msg "done."
-	;;
-stop)
+	eend $?
+}
+
+stop() {
 	do_stop
-	;;
-restart|force-reload)
-	do_reload
-	;;
-*)
-	msg "Usage: /etc/init.d/hibernate {start|stop|restart|force-reload}"
-esac
+}
 
-exit 0
+reload() {
+	do_reload
+}