File: 00hwclock

package info (click to toggle)
apmd 3.0final-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 688 kB
  • ctags: 641
  • sloc: ansic: 2,617; makefile: 567; sh: 240
file content (24 lines) | stat: -rwxr-xr-x 350 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# set the system clock

# get Debian config information
. /etc/default/rcS

if [ -n "$UTC$GMT" -a "$UTC" != "no" ]; then
	GMT="-u"
fi

# support older Debian and non-Debian systems
if [ -x /sbin/clock ]; then
	CLOCK=clock
else
	CLOCK=hwclock
fi


if [ "$1" = suspend ]; then
	$CLOCK -w $GMT
elif [ "$1" = resume ]; then
	$CLOCK -s $GMT
fi