aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rwxr-xr-xadjtime15
-rwxr-xr-xhwclock23
3 files changed, 8 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index fcabb0e..ff7d907 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
VER := $(shell git describe)
-DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /etc/cron.hourly /sbin /etc/bash_completion.d /usr/share/zsh/site-functions
+DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /sbin /etc/bash_completion.d /usr/share/zsh/site-functions
minilogd: minilogd.o
@@ -9,7 +9,6 @@ installdirs:
install: minilogd installdirs
install -m644 -t $(DESTDIR)/etc inittab rc.conf
install -m755 -t $(DESTDIR)/etc rc.local rc.local.shutdown rc.multi rc.shutdown rc.single rc.sysinit
- install -m755 -t $(DESTDIR)/etc/cron.hourly adjtime
install -m644 -t $(DESTDIR)/etc/rc.d functions
install -m755 -t $(DESTDIR)/etc/rc.d hwclock network netfs
install -m755 -t $(DESTDIR)/sbin minilogd rc.d
diff --git a/adjtime b/adjtime
deleted file mode 100755
index 6a825ca..0000000
--- a/adjtime
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-# Update our hwclock for system drift
-
-. /etc/rc.conf
-
-HWCLOCK_PARAMS="--adjust"
-case $HARDWARECLOCK in
- UTC) HWCLOCK_PARAMS+=" --utc";;
- localtime) HWCLOCK_PARAMS+=" --localtime";;
- *) HWCLOCK_PARAMS="";;
-esac
-
-if [[ $HWCLOCK_PARAMS && -f /run/daemons/hwclock ]]; then
- hwclock $HWCLOCK_PARAMS
-fi
diff --git a/hwclock b/hwclock
index 117ab14..5996b95 100755
--- a/hwclock
+++ b/hwclock
@@ -11,27 +11,18 @@ esac
case "$1" in
start)
- if [[ $HWCLOCK_PARAMS ]]; then
- status "Adjusting Hardware Clock" \
- hwclock --adjust
- stat_busy "Setting System Clock"
- hwclock --hctosys $HWCLOCK_PARAMS || stat_die
- stat_done
- # Note: This also enables /etc/cron.hourly/adjtime
- add_daemon hwclock
- fi
- ;;
+ add_daemon hwclock;;
stop)
- if [[ $HWCLOCK_PARAMS ]]; then
- stat_busy "Saving System Clock"
- hwclock --systohc $HWCLOCK_PARAMS || stat_die
- stat_done
- fi
+ case $HARDWARECLOCK in
+ UTC) hwclock --adjust --utc;;
+ localtime) hwclock --adjust --localtime;;
+ "") hwclock --adjust;;
+ esac
rm_daemon hwclock
;;
restart)
$0 stop
- sleep 1
+ sleep 2
$0 start
;;
*)