Package: util-linux Version: 2.12r-12 Severity: normal
Upsteram util-linux package is unmaintained, even lkml got thread on it: <http://marc.theaimsgroup.com/?l=linux-kernel&m=116311234025690&w=2> As i'm interesting in timekeeping, updated hwclock.sh, now seeing how many clock related bugs unsorted, i want to split package (and try to deal with that critical mass of bugs). In 2.6.16 kernel new RTC class subsystem was merged. Update is needed. I've read some docs about how to make deb packages and so forth, but wanted to be under some mentor to ask to. It will be good to have common source, but my patches will be applied as for separarte subsystem. Also some basics about how to deal with BTS here will be appreciated, with other debian infrastructures (links to docs will be enough). As example of my (well, shell skills), find updated LSB hwclock.sh below. -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing'), (77, 'unstable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.18-2-amd64 Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R) Versions of packages util-linux depends on: ii libc6 2.3.6.ds1-7 GNU C Library: Shared libraries ii libncurs 5.5-5 Shared libraries for terminal hand ii libslang 2.0.6-4 The S-Lang programming library - r ii libuuid1 1.39+1.40-WIP-2006.10.02+dfsg-2 universally unique id library ii lsb-base 3.1-15 Linux Standard Base 3.1 init scrip ii zlib1g 1:1.2.3-13 compression library - runtime util-linux recommends no packages. -- no debconf information -*- [/etc/rcS/systemclock] -*- #!/bin/sh ### BEGIN INIT INFO # Time-stamp: "Thu Sep 21 08:11:51 CEST 2006 [EMAIL PROTECTED]" # Provides: time # Defaults: ${HWCLOCK:-/sbin/hwclock} ${UTC:-yes} ${ADJTIME:-} # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: S # Default-Stop: S # Short-Description: Setting the system clock from RTC # Description: Reading time form RTC(CMOS) using hwclock(8) and # setting it to in-kernel system clock, and vice versa. # If $ADJ is set, 'reload' will --adjust hardware clock, # see /usr/share/doc/util-linux/README.Debian.hwclock.gz ### END INIT INFO # Original-Author: Miquel van Smoorenburg <[EMAIL PROTECTED]> # Author: Oleg Verych <[EMAIL PROTECTED]> # Copyright (C) 1998-2006 The Debian Project #set -e -x HWCLOCK=${HWCLOCK:-/sbin/hwclock} [ -x "$HWCLOCK" ] || exit 0 [ -r /etc/default/$NAME ] && . /etc/default/$NAME [ -f /etc/default/rcS ] && . /etc/default/rcS .. /lib/lsb/init-functions # default time zone settings of hardware clock is assumed to be UTC # HWCLOCK_ZONE="--utc" [ "$UTC" = no ] && HWCLOCK_ZONE="--localtime" # do not touch time adjustment by default # [ -z "$ADJTIME" ] && HWCLOCK="$HWCLOCK --noadjfile" HWCLOCK="$HWCLOCK $HWCLOCK_ZONE" unset UTC HWCLOCK_ZONE DESC="Request for the System Clock action(s) using hwclock(8)" NAME=systemclock local err do_start() { if [ ! -z "$ADJTIME" ]; then if [ ! -f /etc/adjtime ] && [ ! -e /etc/adjtime ]; then log_action_begin_msg '`--> Creating zero adjtime file' err=`eval 2>&1 echo "0.0 0 0.0" > /etc/adjtime)` log_action_end_msg $? [ ! -z "$err" ] && log_failure_msg $err fi else log_action_begin_msg '`--> Checking TZ environment variable' if [ ! -f /etc/timezone ] && [ ! -e /etc/timezone ]; then log_warning_msg "/etc/timezone file doesn't exist" TZ='UTC+00' fi export TZ=${TZ:-`cat /etc/timezone`} log_action_end_msg $? log_action_begin_msg '`--> Setting up the System Clock' err=`eval 2>&1 $HWCLOCK --hctosys` log_action_end_msg $? [ ! -z "$err" ] && log_failure_msg $err log_success_msg '\tTime zone:\t\t\t'$TZ. log_begin_msg '\tSystem Time:\t\t\t'`date` log_end_msg $? log_begin_msg '\tUniversal Time Coordinated:\t'`date --utc` log_end_msg $? fi } do_stop() { log_action_begin_msg '`--> Saving System Time to the Hardware Clock' err=`eval 2>&1 $HWCLOCK --systohc` log_action_end_msg $? [ ! -z "$err" ] && log_failure_msg $err } do_reload() { if [ ! -z "$ADJTIME" ]; then log_action_begin_msg '`--> Hardware Clock adjustment' err=`eval 2>&1 $HWCLOCK --adjust` log_action_end_msg $? [ ! -z "$err" ] && log_failure_msg $err else log_warning_msg "Hardware Clock adjustment disabled, skipping." >&2 fi } log_action_begin_msg "$DESC" echo case "$1" in start|stop|reload|force-reload) eval do_$1 : # subactions report failures log_action_end_msg $? exit 0 ;; *) log_warning_msg "Usage: $0 {start|stop|reload}" >&2 log_action_end_msg $? exit 3 ;; esac """ Changelog: * Default time in hardware now assumed to be UTC (opposite to hwclock(8)). * Badyear handling removed. It's (very) outdated problem and hwclock(8) (as stated in man page) warns about this. * Do not use $VERBOSE, user must see what happend to system time settings. * Obsolete parameters: $HWCLOCKPARS $HWCLOCKACCESS. If one realy wants to disable hwclock or pass some more comand line options, let (s)he set $HWCLOCK as needed. * $ADJTIME may be set in /etc/default/rcS, if this feature of hwclock(8) is to be used. * Setting of defined year (1/1/2002 in this case) in case of error also removed. Let user use (whatever) BIOS to correct time/battary etc. Nobody will update this date to future, but being there is not so cool. * Didn't find any TZ setup in my /etc/, thus doing it here too. """ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]