Debian Bug report logs - #520606
hwclock init script should check for ! -L /etc/adjtime

version graph

Package: util-linux; Maintainer for util-linux is LaMont Jones <>; Source for util-linux is src:util-linux.

Reported by: Jörg Sommer <>

Date: Sat, 21 Mar 2009 10:03:01 UTC

Severity: normal

Found in version util-linux/

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to, LaMont Jones <>:
Bug#520606; Package util-linux. (Sat, 21 Mar 2009 10:03:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jörg Sommer <>:
New Bug report received and forwarded. Copy sent to LaMont Jones <>. (Sat, 21 Mar 2009 10:03:33 GMT) Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: Jörg Sommer <>
To: Debian Bug Tracking System <>
Subject: hwclock init script should check for ! -L /etc/adjtime
Date: Sat, 21 Mar 2009 10:47:35 +0100
[Message part 1 (text/plain, inline)]
Package: util-linux
Severity: normal


if /etc/adjtime is a symlink to /var and the filesystem underneath /var
is not mounted the check ! -f /etc/adjtime succeeds, but echo … >
/etc/adjtime fails. You should better check if /etc/adjtime is a symlink
and the second check ! -e /etc/adjtime checks the presence of the file.

Bye, Jörg.

diff --git a/init.d/ b/init.d/
index 5d49e28..95265e9 100755
--- a/init.d/
+++ b/init.d/
@@ -63,7 +63,7 @@ hwclocksh()
     case "$1" in
-           if [ -w /etc ] && [ ! -f /etc/adjtime ] && [ ! -e /etc/adjtime ]; then
+           if [ -w /etc ] && [ ! -L /etc/adjtime ] && [ ! -e /etc/adjtime ]; then
                echo "0.0 0 0.0" > /etc/adjtime

-- System Information:
Debian Release: unstable/experimental
  APT prefers unstable
  APT policy: (900, 'unstable'), (700, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.29-rc8
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to de_DE.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages util-linux depends on:
ii  libc6                  2.9-6             GNU C Library: Shared libraries
ii  libncurses5            5.7+20090228-1    shared libraries for terminal hand
ii  libselinux1            2.0.71-1          SELinux shared libraries
ii  libslang2              2.1.3-3           The S-Lang programming library - r
ii  libuuid1               1.41.3-1          universally unique id library
ii  lsb-base               3.2-21            Linux Standard Base 3.2 init scrip
ii  tzdata                 2009c-1           time zone and daylight-saving time
ii  zlib1g                 1: compression library - runtime

util-linux recommends no packages.

Versions of packages util-linux suggests:
ii  dosfstools                    3.0.2-1    utilities for making and checking 
ii  kbd                           1.15-1     Linux console font and keytable ut
pn  util-linux-locales            <none>     (no description available)

-- no debconf information
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Wed Apr 16 18:59:54 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.