summaryrefslogtreecommitdiff
blob: 9d0157d3f6fb3b178081e1d7f3138d6b9ec3b172 (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
diff -Nru hibernate-script-2.0.vanilla/init.d/hibernate-cleanup.sh hibernate-script-2.0/init.d/hibernate-cleanup.sh
--- hibernate-script-2.0.vanilla/init.d/hibernate-cleanup.sh	2009-05-01 23:03:41.000000000 +0100
+++ hibernate-script-2.0/init.d/hibernate-cleanup.sh	2009-05-01 23:03:55.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/sbin/openrc-run
 
 # This script invalidates any stale swsusp and TuxOnIce images. It
 # searches all swap partitions on your machine, as well as TuxOnIce's
@@ -91,27 +91,30 @@
 
 
 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
+}