Allow syncing of hwlock for BSD and make our config files look fairly similar.

This commit is contained in:
Roy Marples 2007-07-04 18:11:01 +00:00
parent 710a67138f
commit 31a9682c98
7 changed files with 17 additions and 15 deletions

View File

@ -4,11 +4,6 @@
CLOCK_OPTS="" 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 # 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. # /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 # Note that a blank value means that you do not wish to even use the

View File

@ -2,11 +2,7 @@
# Put a nologin file in /etc to prevent people from logging in before # Put a nologin file in /etc to prevent people from logging in before
# system startup is complete # system startup is complete
DELAYLOGIN="no" DELAYLOGIN="no"
# Should we completely wipe out /tmp or just selectively remove known
# locks / files / etc... ? # locks / files / etc... ?
WIPE_TMP="yes" WIPE_TMP="yes"

View File

@ -4,5 +4,4 @@
# shutdown rather than at next boot. # shutdown rather than at next boot.
# This is useful when periodic filesystem checks are causing undesirable # This is useful when periodic filesystem checks are causing undesirable
# delays at startup, but such delays at shutdown are acceptable. # delays at startup, but such delays at shutdown are acceptable.
FSCK_SHUTDOWN="no" FSCK_SHUTDOWN="no"

View File

@ -4,13 +4,15 @@
# Greenwich Mean Time). If your clock is set to the local time, then # 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 # set CLOCK to "local". Note that if you dual boot with Windows, then
# you should set it to "local". # you should set it to "local".
CLOCK="UTC" 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 # Select the proper timezone. For valid values, peek inside of the
# /usr/share/zoneinfo/ directory. For example, some common values are # /usr/share/zoneinfo/ directory. For example, some common values are
# "America/New_York" or "EST5EDT" or "Europe/Berlin". If you want to # "America/New_York" or "EST5EDT" or "Europe/Berlin". If you want to
# manage /etc/localtime yourself, set this to "". # manage /etc/localtime yourself, set this to "".
#TIMEZONE="Factory" #TIMEZONE="Factory"

View File

@ -1,4 +1,2 @@
# /etc/conf.d/hostname
# Set to the hostname of this machine # Set to the hostname of this machine
HOSTNAME="localhost" HOSTNAME="localhost"

View File

@ -4,5 +4,4 @@
# (say for crypt swap), so you will need to customize this # (say for crypt swap), so you will need to customize this
# behavior. If you have /var on a separate partition, then # behavior. If you have /var on a separate partition, then
# make sure this path lives on your root device somewhere. # make sure this path lives on your root device somewhere.
URANDOM_SEED="/var/run/random-seed" URANDOM_SEED="/var/run/random-seed"

View File

@ -2,6 +2,8 @@
# Copyright 1999-2007 Gentoo Foundation # Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
opts="save"
depend() { depend() {
# BSD adjkerntz needs to be able to write to /etc # BSD adjkerntz needs to be able to write to /etc
if [ "${CLOCK}" = "UTC" -a -e /etc/wall_cmos_clock ] || if [ "${CLOCK}" = "UTC" -a -e /etc/wall_cmos_clock ] ||
@ -28,7 +30,18 @@ start() {
eend $? eend $?
} }
save() {
local TBLURB="Local Time"
[ "${CLOCK}" = "UTC" ] && TBLURB="UTC"
ebegin "Setting hardware clock using the system clock" "[${TBLURB}]"
adjkerntz -a
eend $?
}
stop() { stop() {
# Don't tweak the hardware clock on LiveCD halt.
[ -z "${CDBOOT}" -a "${CLOCK_SYSTOHC}" = "yes" ] && save
ebegin "Stopping the System Clock Adjuster" ebegin "Stopping the System Clock Adjuster"
if start-stop-daemon --test --quiet --stop --exec /sbin/adjkerntz ; then if start-stop-daemon --test --quiet --stop --exec /sbin/adjkerntz ; then
start-stop-daemon --stop --exec /sbin/adjkerntz start-stop-daemon --stop --exec /sbin/adjkerntz