Bug 423463 - 2 bugs found in ntpd init script
Summary: 2 bugs found in ntpd init script
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.0
Classification: openSUSE
Component: Bootloader (show other bugs)
Version: Final
Hardware: x86-64 openSUSE 11.0
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Peter Varkoly
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-05 01:13 UTC by Jon Nelson
Modified: 2008-09-09 06:28 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Nelson 2008-09-05 01:13:57 UTC
I found 2 bugs in the ntpd init script, both in the ntptimeset section:

1. /etc/ntp.conf used instead of $NTP_CONF (where $NTP_CONF is used everywhere else)
2. broken use of if <condition> && success || failure: if the NTPD_BIND invocation returned non-zero (such as if ntpd is running, there is a failure to bind, etc...) the 'echo "no server configured"' command is executed.

Correct (or, at least, more correct):

 ntptimeset)
   if grep -v 127.127.1.0 $NTP_CONF | grep ^server >/dev/null; then
     $NTPD_BIN $NTPD_OPTIONS -c $NTP_CONF -q
   else
     echo "no server configured"
   fi
 ;;
Comment 3 Peter Varkoly 2008-09-09 06:28:16 UTC
Thank you for your feedback. We'll fix this for openSUSE 11.1