summaryrefslogtreecommitdiff
path: root/packages/busybox/files/hwclock.sh
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /packages/busybox/files/hwclock.sh
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'packages/busybox/files/hwclock.sh')
-rw-r--r--packages/busybox/files/hwclock.sh76
1 files changed, 0 insertions, 76 deletions
diff --git a/packages/busybox/files/hwclock.sh b/packages/busybox/files/hwclock.sh
deleted file mode 100644
index 6c0af3422c..0000000000
--- a/packages/busybox/files/hwclock.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-# hwclock.sh Set system clock to hardware clock, according to the UTC
-# setting in /etc/default/rcS (see also rcS(5)).
-#
-# WARNING: If your hardware clock is not in UTC/GMT, this script
-# must know the local time zone. This information is
-# stored in /etc/localtime. This might be a problem if
-# your /etc/localtime is a symlink to something in
-# /usr/share/zoneinfo AND /usr isn't in the root
-# partition! The workaround is to define TZ either
-# in /etc/default/rcS, or in the proper place below.
-
-[ ! -x /sbin/hwclock ] && exit 0
-
-. /etc/default/rcS
-
-[ "$UTC" = yes ] && UTC=--utc || UTC=--localtime
-
-case "$1" in
- start)
- if [ "$VERBOSE" != no ]
- then
- echo "System time was `date`."
- echo "Setting the System Clock using the Hardware Clock as reference..."
- fi
-
- if [ "$HWCLOCKACCESS" != no ]
- then
- if [ -z "$TZ" ]
- then
- hwclock -s $UTC;# --hctosys
- else
- TZ="$TZ" hwclock -s $UTC;# --hctosys
- fi
- fi
-
- if [ "$VERBOSE" != no ]
- then
- echo "System Clock set. System local time is now `date`."
- fi
- ;;
- stop|restart|reload|force-reload)
- #
- # Updates the Hardware Clock with the System Clock time.
- # This will *override* any changes made to the Hardware Clock.
- #
- # WARNING: If you disable this, any changes to the system
- # clock will not be carried across reboots.
- #
- if [ "$VERBOSE" != no ]
- then
- echo "Saving the System Clock time to the Hardware Clock..."
- fi
- if [ "$HWCLOCKACCESS" != no ]
- then
- hwclock -w $UTC;# --systohc
- fi
- if [ "$VERBOSE" != no ]
- then
- echo "Hardware Clock updated to `date`."
- fi
- exit 0
- ;;
- show)
- if [ "$HWCLOCKACCESS" != no ]
- then
- hwclock -r $UTC;# --show
- fi
- ;;
- *)
- echo "Usage: hwclock.sh {start|stop|show|reload|restart}" >&2
- echo " start sets kernel (system) clock from hardware (RTC) clock" >&2
- echo " stop and reload set hardware (RTC) clock from kernel (system) clock" >&2
- exit 1
- ;;
-esac