Magellan Linux

Annotation of /trunk/rdate/rdate.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1511 - (hide annotations) (download)
Thu Sep 1 16:21:05 2011 UTC (12 years, 8 months ago) by niro
File size: 628 byte(s)
-use rc_echo/rc_print
1 niro 123 #!/bin/bash
2 niro 729 # $Header: /root/magellan-cvs/src/rdate/rdate.rc,v 1.3 2008-12-24 09:54:04 niro Exp $
3 niro 123
4     #%rlevels: 3:s 4:s 5:s
5     #%start: 30
6     #%stop:
7    
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13 niro 729 source /etc/conf.d/rc
14 niro 123 source $rc_functions
15     source /etc/conf.d/rdate
16    
17     if [[ -z ${RDATE_SERVER} ]]
18     then
19 niro 1511 rc_echo "\$RDATE_SERVER not set ..."
20 niro 123 exit 1
21     fi
22    
23     if [[ -z ${RDATE_TIMEOUT} ]]
24     then
25 niro 1511 rc_echo "\$RDATE_TIMEOUT not set ..."
26 niro 123 exit 1
27     fi
28    
29 niro 1511 rc_print "Synchronizing clock with ${COLBLUE}${RDATE_SERVER}${COLDEFAULT} ..."
30 niro 123 rdate -s -t ${RDATE_TIMEOUT} ${RDATE_OPTS} ${RDATE_SERVER}
31     evaluate_retval
32    
33     update_svcstatus $1
34     splash svc_started "$(basename $0)" 0