Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 168830 - net-misc/rdate-1.4 init script patch to "automatically zap" after being started and use built-in timeout functionality
Summary: net-misc/rdate-1.4 init script patch to "automatically zap" after being start...
Status: VERIFIED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-01 07:13 UTC by Yang Zhao
Modified: 2007-04-03 05:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
init script patch (rdate_init.patch,457 bytes, patch)
2007-03-01 07:13 UTC, Yang Zhao
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yang Zhao 2007-03-01 07:13:04 UTC
As rdate does not actually start any daemons, and it is actually an annoyance having to run '/etc/init.d/rdate zap' before '/etc/init.d/rdate start' can be used again, this patch modifies its init script such that it will never be marked as "started". Although it may not be a pretty solution, it appears to work, and runscript did not complain at all in my tests.

The patch also uses the timeout functionality built into rdate as opposed to using kill. This, however, does mean rdate's output is not suppressed. #48493 is related, but old. I am willing to work on a patch for 1.4 to add quiet functionality if the ebuild patch will be considered for acceptance if provided with a quiet-mode patch.

Reproducible: Always

Steps to Reproduce:
Comment 1 Yang Zhao 2007-03-01 07:13:45 UTC
Created attachment 111649 [details, diff]
init script patch
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-03-01 09:14:57 UTC
(In reply to comment #0)
> As rdate does not actually start any daemons, and it is actually an annoyance
> having to run '/etc/init.d/rdate zap' before '/etc/init.d/rdate start' can be
> used again

What's wrong with /etc/init.d/rdate restart? It doesn't work, or... ?
Comment 3 Yang Zhao 2007-03-01 15:54:56 UTC
(In reply to comment #2)
> What's wrong with /etc/init.d/rdate restart? It doesn't work, or... ?

Nope, works perfectly fine.

I did it more to satisfy my own curiosity, as, functionally, the current init script works just fine. Figured I'd submit it to see if anyone else agreed this is a more fitting way to show rdate's functionality--hence, "enhancement" :)
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-04-01 23:40:56 UTC
I'm inclined to think rdate should stay started, as I'm worried about infinite loops if it clears it's started state, or always returns a fail.
In both of these cases, services that use/need/depend on rdate will never start.
Comment 5 Yang Zhao 2007-04-02 05:41:24 UTC
(In reply to comment #4)

That's a fair concern. However, are there any components that depends on rdate? Or, more generally, is it even appropriate to depend on any component that simply updates the system time?

In any case, I think it's still a good idea to move to using rdate's built-in timeout functionality rather than killing it after a certain time. Although definitely very unlikely, the possibility that kill can cause rdate to terminate at an inappropriate state or even accidentally kill the wrong process is non-zero.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-04-02 21:10:17 UTC
our baselayout guys say the it should remain started, and not clear itself up.

Another breakage case I thought of is systems that try to keep apps in the runlevel started. These would repeatedly run rdate.
Comment 7 Yang Zhao 2007-04-03 02:05:56 UTC
Okay, that's fair.

What about the use built-in timeout portion? New bug?
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-04-03 02:21:29 UTC
yes please.