aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-07-04 18:11:01 +0000
committerRoy Marples <roy@marples.name>2007-07-04 18:11:01 +0000
commit31a9682c98005b4c8f37c37fb7bd50fad21b7115 (patch)
tree51f3d806f3668cecad624c8cef472c3e799584dd
parent710a67138f7efc4c3442fbbc1a37e1d7191f6a24 (diff)
Allow syncing of hwlock for BSD and make our config files look fairly similar.
-rw-r--r--conf.d.Linux/clock5
-rw-r--r--conf.d/bootmisc4
-rw-r--r--conf.d/checkfs1
-rw-r--r--conf.d/clock6
-rw-r--r--conf.d/hostname2
-rw-r--r--conf.d/urandom1
-rwxr-xr-xinit.d.BSD/clock13
7 files changed, 17 insertions, 15 deletions
diff --git a/conf.d.Linux/clock b/conf.d.Linux/clock
index 0ff87c01..df767b28 100644
--- a/conf.d.Linux/clock
+++ b/conf.d.Linux/clock
@@ -4,11 +4,6 @@
CLOCK_OPTS=""
-# If you want to set the Hardware Clock to the current System Time
-# during shutdown, then say "yes" here.
-
-CLOCK_SYSTOHC="no"
-
# Newer FHS specs say this file should live in /var/lib rather than
# /etc. If you care about such things, feel free to change this value.
# Note that a blank value means that you do not wish to even use the
diff --git a/conf.d/bootmisc b/conf.d/bootmisc
index e33c03b3..147f9d03 100644
--- a/conf.d/bootmisc
+++ b/conf.d/bootmisc
@@ -2,11 +2,7 @@
# Put a nologin file in /etc to prevent people from logging in before
# system startup is complete
-
DELAYLOGIN="no"
-
-# Should we completely wipe out /tmp or just selectively remove known
# locks / files / etc... ?
-
WIPE_TMP="yes"
diff --git a/conf.d/checkfs b/conf.d/checkfs
index 868dfaba..6b7e06e5 100644
--- a/conf.d/checkfs
+++ b/conf.d/checkfs
@@ -4,5 +4,4 @@
# shutdown rather than at next boot.
# This is useful when periodic filesystem checks are causing undesirable
# delays at startup, but such delays at shutdown are acceptable.
-
FSCK_SHUTDOWN="no"
diff --git a/conf.d/clock b/conf.d/clock
index f11df3fa..bac057c0 100644
--- a/conf.d/clock
+++ b/conf.d/clock
@@ -4,13 +4,15 @@
# Greenwich Mean Time). If your clock is set to the local time, then
# set CLOCK to "local". Note that if you dual boot with Windows, then
# you should set it to "local".
-
CLOCK="UTC"
+# If you want to set the Hardware Clock to the current System Time
+# during shutdown, then say "yes" here.
+CLOCK_SYSTOHC="no"
+
# Select the proper timezone. For valid values, peek inside of the
# /usr/share/zoneinfo/ directory. For example, some common values are
# "America/New_York" or "EST5EDT" or "Europe/Berlin". If you want to
# manage /etc/localtime yourself, set this to "".
-
#TIMEZONE="Factory"
diff --git a/conf.d/hostname b/conf.d/hostname
index 619abcd3..f17fabd1 100644
--- a/conf.d/hostname
+++ b/conf.d/hostname
@@ -1,4 +1,2 @@
-# /etc/conf.d/hostname
-
# Set to the hostname of this machine
HOSTNAME="localhost"
diff --git a/conf.d/urandom b/conf.d/urandom
index 0c3e63c9..52f43430 100644
--- a/conf.d/urandom
+++ b/conf.d/urandom
@@ -4,5 +4,4 @@
# (say for crypt swap), so you will need to customize this
# behavior. If you have /var on a separate partition, then
# make sure this path lives on your root device somewhere.
-
URANDOM_SEED="/var/run/random-seed"
diff --git a/init.d.BSD/clock b/init.d.BSD/clock
index 71d170ee..0baa2884 100755
--- a/init.d.BSD/clock
+++ b/init.d.BSD/clock
@@ -2,6 +2,8 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+opts="save"
+
depend() {
# BSD adjkerntz needs to be able to write to /etc
if [ "${CLOCK}" = "UTC" -a -e /etc/wall_cmos_clock ] ||
@@ -28,7 +30,18 @@ start() {
eend $?
}
+save() {
+ local TBLURB="Local Time"
+ [ "${CLOCK}" = "UTC" ] && TBLURB="UTC"
+ ebegin "Setting hardware clock using the system clock" "[${TBLURB}]"
+ adjkerntz -a
+ eend $?
+}
+
stop() {
+ # Don't tweak the hardware clock on LiveCD halt.
+ [ -z "${CDBOOT}" -a "${CLOCK_SYSTOHC}" = "yes" ] && save
+
ebegin "Stopping the System Clock Adjuster"
if start-stop-daemon --test --quiet --stop --exec /sbin/adjkerntz ; then
start-stop-daemon --stop --exec /sbin/adjkerntz