Bug 423463

Summary: 2 bugs found in ntpd init script
Product: [openSUSE] openSUSE 11.0 Reporter: Jon Nelson <jnelson-suse>
Component: BootloaderAssignee: Peter Varkoly <varkoly>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.0   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

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