Commit bbb0a751 authored by Mike Hibler's avatar Mike Hibler
Browse files

If there is a /etc/hosts entry for "ntp1" use that for ntpdate call.

Used to always use boss, which isn't necessarily right.

If host entry isn't present, fall back on boss. The plan is that
localize_mfs will create the /etc/hosts entry in the frisbee MFS.
I didn't want to have the MFS just use "ntp1" since the rest of the
script doesn't depend on a functioning name server.
parent c87849aa
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
......@@ -494,8 +494,12 @@ STATUS=`$BINDIR/tmcc status`
BOSSIP=`echo $BOSSINFO | awk '{ print $2 }'`
NTPIP=`grep -w ntp1 /etc/hosts 2>/dev/null | awk '{ print $1 }'`
if [ -z "$NTPIP" ]; then
if [ -x /usr/sbin/ntpdate ]; then
/usr/sbin/ntpdate -b $BOSSIP >/dev/null 2>&1
/usr/sbin/ntpdate -b $NTPIP >/dev/null 2>&1
# Enable IPoD
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment