Magellan Linux

Annotation of /trunk/magellan-initscripts/etc/rc.d/init.d/swap

Parent Directory Parent Directory | Revision Log Revision Log


Revision 781 - (hide annotations) (download)
Mon Dec 22 22:01:15 2008 UTC (15 years, 4 months ago) by niro
File size: 818 byte(s)
-use /etc/conf.d/rc instead of /etc/sysconfig/rc

1 niro 2 #!/bin/bash
2 niro 781 # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/swap,v 1.3 2008-12-22 22:01:15 niro Exp $
3 niro 2
4     #%rlevels: 7:s 0:k 6:k
5     #%start: 10
6     #%stop: 70
7    
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13 niro 781 source /etc/conf.d/rc
14     source ${rc_functions}
15 niro 2
16     case "$1" in
17     start)
18     echo -e ${COLOREDSTAR}"Activating all swap files/partitions ..."
19     swapon -a
20     evaluate_retval
21    
22     update_svcstatus $1
23     splash svc_started "$(basename $0)" 0
24     ;;
25    
26     stop)
27     echo -e ${COLOREDSTAR}"Deactivating all swap files/partitions ..."
28     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     echo "Retrieving swap status ..."
43     echo
44     swapon -s
45     ;;
46    
47     *)
48     echo "Usage: $0 {start|stop|restart|status}"
49     exit 1
50     ;;
51     esac

Properties

Name Value
svn:executable *