Annotation of /tags/busybox-init-0_1_11/rc/swap
Parent Directory | Revision Log
Revision 1217 -
(hide annotations)
(download)
Fri Jan 28 22:07:42 2011 UTC (13 years, 8 months ago) by niro
File size: 781 byte(s)
Fri Jan 28 22:07:42 2011 UTC (13 years, 8 months ago) by niro
File size: 781 byte(s)
tagged 'busybox-init-0_1_11'
1 | niro | 724 | #!/bin/sh |
2 | # $Header: /home/cvsd/magellan-cvs/magellan-src/busybox-initscripts/rc/swap,v 1.1 2008-06-02 22:14:35 niro Exp $ | ||
3 | |||
4 | #%rlevels: 7:s 0:k | ||
5 | #%start: 10 | ||
6 | #%stop: 70 | ||
7 | |||
8 | #deps | ||
9 | #%needs: | ||
10 | #%before: | ||
11 | #%after: | ||
12 | |||
13 | source /etc/conf.d/rc | ||
14 | source ${rc_functions} | ||
15 | |||
16 | case "$1" in | ||
17 | start) | ||
18 | niro | 1168 | rc_print "Activating all swap files/partitions ..." |
19 | niro | 724 | swapon -a |
20 | evaluate_retval | ||
21 | |||
22 | update_svcstatus $1 | ||
23 | splash svc_started "$(basename $0)" 0 | ||
24 | ;; | ||
25 | |||
26 | stop) | ||
27 | niro | 1168 | rc_print "Deactivating all swap files/partitions ..." |
28 | niro | 724 | swapoff -a |
29 | evaluate_retval | ||
30 | |||
31 | update_svcstatus $1 | ||
32 | splash svc_stopped "$(basename $0)" 0 | ||
33 | ;; | ||
34 | |||
35 | restart) | ||
36 | $0 stop | ||
37 | sleep 1 | ||
38 | $0 start | ||
39 | ;; | ||
40 | |||
41 | status) | ||
42 | niro | 1198 | rc_echo "Retrieving swap status ..." |
43 | rc_echo | ||
44 | niro | 724 | swapon -s |
45 | ;; | ||
46 | |||
47 | *) | ||
48 | niro | 1198 | rc_echo "Usage: $0 {start|stop|restart|status}" |
49 | niro | 724 | exit 1 |
50 | ;; | ||
51 | esac |