[hwclock] full path for a command possibly uncommented in init script

Bug #103680 reported by glandux
4
Affects Status Importance Assigned to Milestone
util-linux (Debian)
Fix Released
Unknown
util-linux (Ubuntu)
Fix Released
Low
LaMont Jones

Bug Description

The hwclock init script /etc/init.d/hwclock.sh has a command line which can be uncommented, but don't have a full path given.
In addition, there is a typo in the comment just above: s/enablig/enabling/

This is the corresponding patch:

@@ -68,9 +68,9 @@
            # used.
            #
            # Please read /usr/share/doc/util-linux/README.Debian.hwclock
- # before enablig hwclock --adjust.
+ # before enabling hwclock --adjust.

- #hwclock --adjust $GMT $BADYEAR
+ #/sbin/hwclock --adjust $GMT $BADYEAR
            :

            if [ "$HWCLOCKACCESS" != no ]; then

Revision history for this message
Ralph Janke (txwikinger) wrote :

Confirmed in feisty

Changed in util-linux:
assignee: nobody → rjanke
status: Unconfirmed → Confirmed
Revision history for this message
Matt Zimmerman (mdz) wrote :

Why do you feel this is a problem? The only error I see is the typo in the earlier comment ("enablig")

Revision history for this message
Ralph Janke (txwikinger) wrote :

I think it was filed about the inconsitency in the call of hwclock. Throughout the script it is /sbin/hwclock however, in that commented instance it is just hwclock.

- #hwclock --adjust $GMT $BADYEAR
 + #/sbin/hwclock --adjust $GMT $BADYEAR

I guess it is just cosmetic and nothing of real severity, but for the good style I think it would be good to be change for future releases.

Changed in util-linux:
status: Unknown → Unconfirmed
Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 103680] Re: [hwclock] full path for a command possibly uncommented in init script

On Sat, Apr 07, 2007 at 12:04:21AM -0000, txwikinger wrote:
> I think it was filed about the inconsitency in the call of hwclock.
> Throughout the script it is /sbin/hwclock however, in that commented
> instance it is just hwclock.
>
> - #hwclock --adjust $GMT $BADYEAR
> + #/sbin/hwclock --adjust $GMT $BADYEAR
>
> I guess it is just cosmetic and nothing of real severity, but for the
> good style I think it would be good to be change for future releases.

I see. In that case, I'd be inclined to change it to hwclock throughout,
rather than /sbin/hwclock.

--
 - mdz

Revision history for this message
glandux (glandux) wrote :

Txwikinger is right in its explanations of my intentions for this bug report, it is for consistency with all others usages of hwclock command in the script (I'm sorry, I should have explain that in my report). It's not critical, and again less critical in this case because the flag is "--adjust" which not involve an important operation contrary to actions involved by "--set" or "--hctosys" flags.
I guessed that if the complete path was given for hwclock it was a precaution, and if developer of this script made this choice it may have a good raison to do that.
Normally, it can perfectly function without full path, but for the full path suppression suggested by Matt, maybe we should ensure that the choice of using full path had no particular goal which may a precaution policy (to not rely on PATH variable value for example).

Making search about that, I tried to consult the documentation file indicated in this script comments, and I noticed that the filename was not complete because of a missing extension (see bug #104467 for details).

Revision history for this message
Ralph Janke (txwikinger) wrote :

Waiting for upstream response

Ralph Janke (txwikinger)
Changed in util-linux:
importance: Undecided → Low
Changed in util-linux:
status: New → Fix Released
Revision history for this message
LaMont Jones (lamont) wrote :

Fixed in 2.13.1~rc2-1ubuntu1

Changed in util-linux:
assignee: txwikinger → lamont
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.