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 <lamont@debian.org>; Source for util-linux is src:util-linux.

Reported by: Jörg Sommer <joerg@alea.gnuu.de>

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

Severity: normal

Found in version util-linux/2.13.1.1-1

Reply or subscribe to this bug.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
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 <joerg@alea.gnuu.de>:
New Bug report received and forwarded. Copy sent to LaMont Jones <lamont@debian.org>. (Sat, 21 Mar 2009 10:03:33 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jörg Sommer <joerg@alea.gnuu.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
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
Version: 2.13.1.1-1
Severity: normal

Hi,

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/hwclockfirst.sh b/init.d/hwclockfirst.sh
index 5d49e28..95265e9 100755
--- a/init.d/hwclockfirst.sh
+++ b/init.d/hwclockfirst.sh
@@ -63,7 +63,7 @@ hwclocksh()
 
     case "$1" in
        start)
-           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
            fi
 

-- 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:1.2.3.3.dfsg-13 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 <owner@bugs.debian.org>. Last modified: Wed Apr 23 18:46:47 2014; Machine Name: beach.debian.org

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