aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <somasis@exherbo.org>2016-05-13 00:12:00 -0400
committerKylie McClain <somasis@exherbo.org>2016-05-13 00:16:07 -0400
commit68f0f3cbb77f31f7936acfa238be318817df87ed (patch)
tree9990f17d81dfaed9a00cc6798d164fc8c5fa8c3b
parent8899290e24f09f2992317065500e56682d2335ec (diff)
downloadbeginning-scripts-68f0f3cbb77f31f7936acfa238be318817df87ed.tar.gz
beginning-scripts-68f0f3cbb77f31f7936acfa238be318817df87ed.tar.xz
beginning-scripts-68f0f3cbb77f31f7936acfa238be318817df87ed.zip
hwclock: move to beginning main repo
-rw-r--r--hwclock57
1 files changed, 0 insertions, 57 deletions
diff --git a/hwclock b/hwclock
deleted file mode 100644
index 28f80f4..0000000
--- a/hwclock
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-HWCLOCK_ARGS=${HWCLOCK_ARGS:-}
-HWCLOCK_TYPE=${HWCLOCK_TYPE:-UTC}
-[[ -L "@@sysconfdir@@"/localtime && -r "@@sysconfdir@@"/localtime ]] && \
- HWCLOCK_TZ=$(realpath "@@sysconfdir@@"/localtime | cut -d'/' -f5-)
-HWCLOCK_TZ=${HWCLOCK_TZ:-UTC}
-
-hwclock_exists() {
- if prog_exists hwclock && [[ -e /dev/rtc0 ]];then
- return 0
- else
- return 1
- fi
-}
-
-hwclock_start() {
- local err
- export TZ=${HWCLOCK_TZ}
- case ${HWCLOCK_TYPE,,} in
- localtime)
- hwclock --hctosys --localtime ${HWCLOCK_ARGS};err=$?
- ;;
- utc)
- hwclock --hctosys --utc ${HWCLOCK_ARGS};err=$?
- ;;
- *)
- err=1
- ;;
- esac
- unset TZ
- echo "TZ=${HWCLOCK_TZ}" > "@@runstatedir@@"/beginning/hwclock
- return $err
-}
-
-hwclock_stop() {
- local err
- export TZ=${HWCLOCK_TZ}
- case ${HWCLOCK_TYPE,,} in
- localtime)
- hwclock --systohc --localtime;err=$?
- ;;
- utc)
- hwclock --systohc --utc;err=$?
- ;;
- *)
- err=1
- ;;
- esac
- unset TZ
- rm -f "@@runstatedir@@"/beginning/hwclock
- return $err
-}
-
-hwclock_status() {
- [[ -r "@@runstatedir@@"/beginning/hwclock ]]
-}