diff options
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | adjtime | 15 | ||||
-rwxr-xr-x | hwclock | 23 |
3 files changed, 8 insertions, 33 deletions
@@ -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 @@ -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 ;; *) |