From: | "Krzysiek Pawlik (nelchael)" <nelchael@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-power/hibernate-script/files: hibernate-script-2.0-init.d.patch |
Date: | Fri, 01 May 2009 22:07:31 |
Message-Id: | E1M00tC-0001IP-3v@stork.gentoo.org |
1 | nelchael 09/05/01 22:07:26 |
2 | |
3 | Added: hibernate-script-2.0-init.d.patch |
4 | Log: |
5 | Fix init.d script, see bug #265368. |
6 | (Portage version: 2.1.6.11/cvs/Linux x86_64) |
7 | |
8 | Revision Changes Path |
9 | 1.1 sys-power/hibernate-script/files/hibernate-script-2.0-init.d.patch |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/hibernate-script/files/hibernate-script-2.0-init.d.patch?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/hibernate-script/files/hibernate-script-2.0-init.d.patch?rev=1.1&content-type=text/plain |
13 | |
14 | Index: hibernate-script-2.0-init.d.patch |
15 | =================================================================== |
16 | diff -Nru hibernate-script-2.0.vanilla/init.d/hibernate-cleanup.sh hibernate-script-2.0/init.d/hibernate-cleanup.sh |
17 | --- hibernate-script-2.0.vanilla/init.d/hibernate-cleanup.sh 2009-05-01 23:03:41.000000000 +0100 |
18 | +++ hibernate-script-2.0/init.d/hibernate-cleanup.sh 2009-05-01 23:03:55.000000000 +0100 |
19 | @@ -1,4 +1,4 @@ |
20 | -#!/bin/sh |
21 | +#!/sbin/runscript |
22 | |
23 | # This script invalidates any stale swsusp and TuxOnIce images. It |
24 | # searches all swap partitions on your machine, as well as TuxOnIce's |
25 | @@ -91,27 +91,30 @@ |
26 | |
27 | |
28 | msg_status() { |
29 | - echo -n "$1" |
30 | + einfon "$1" |
31 | } |
32 | |
33 | msg() { |
34 | - echo "$1" |
35 | + einfo "$1" |
36 | } |
37 | |
38 | -case "$1" in |
39 | -start) |
40 | - msg_status "Invalidating stale software suspend images... " |
41 | +opts="reload" |
42 | + |
43 | +depend() { |
44 | + after modules |
45 | + before localmount |
46 | +} |
47 | + |
48 | +start() { |
49 | + ebegin "Invalidating stale software suspend images" |
50 | do_start |
51 | - msg "done." |
52 | - ;; |
53 | -stop) |
54 | + eend $? |
55 | +} |
56 | + |
57 | +stop() { |
58 | do_stop |
59 | - ;; |
60 | -restart|force-reload) |
61 | - do_reload |
62 | - ;; |
63 | -*) |
64 | - msg "Usage: /etc/init.d/hibernate {start|stop|restart|force-reload}" |
65 | -esac |
66 | +} |
67 | |
68 | -exit 0 |
69 | +reload() { |
70 | + do_reload |
71 | +} |