AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@lsi.com
RQ:
SSV:mhbs.lsil.com
NSV:
SSH:
R:<Ed.Kwan@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	2B044E14371DA244B71F8BF2514563F53B90FA96@cosmail03.lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Thu, 4 Feb 2010 16:13:33 -0800
From: Andrew Sharp <andy.sharp@lsi.com>
To: "Kwan, Ed" <Ed.Kwan@lsi.com>
Subject: Re: Additional code change for TED 27764 Change ICW to require
 local date and time, and optionally ask for NTP
Message-ID: <20100204161333.66be69ff@ripper.onstor.net>
In-Reply-To: <2B044E14371DA244B71F8BF2514563F53B90FA96@cosmail03.lsi.com>
References: <2B044E14371DA244B71F8BF2514563F53B90F996@cosmail03.lsi.com>
	<20100204133547.27eea0d5@ripper.onstor.net>
	<2B044E14371DA244B71F8BF2514563F53B90FA37@cosmail03.lsi.com>
	<20100204154651.797d671a@ripper.onstor.net>
	<2B044E14371DA244B71F8BF2514563F53B90FA96@cosmail03.lsi.com>
Organization: LSI
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Thu, 4 Feb 2010 17:04:36 -0700 "Kwan, Ed" <Ed.Kwan@lsi.com> wrote:

> Yes, tk_disable_ntp() is a one liner.  It passes tk_reset_ntp_cfg()
> as a parameter to modify_readonly_file(). tk_reset_ntp_cfg() calls
> copy_template(), which copies /onstor/etc/ntp.conf.template
> to /etc/ntp.conf. The code is wacky.

Doh.  Shoulda looked more closely.


> 
> -----Original Message-----
> From: Andrew Sharp [mailto:andy.sharp@lsi.com] 
> Sent: Thursday, February 04, 2010 3:47 PM
> To: Kwan, Ed
> Subject: Re: Additional code change for TED 27764 Change ICW to
> require local date and time, and optionally ask for NTP
> 
> OK, well if you say tk_ntp_disable() resets the config, I'll take
> you're word for it, but I looked at that code and didn't see it.  I
> think it was a one liner.  But maybe I just didn't recognise what I
> was looking at.  Yeah, that's probably it.
> 
> On Thu, 4 Feb 2010 15:13:17 -0700 "Kwan, Ed" <Ed.Kwan@lsi.com> wrote:
> 
> > Comments inline
> > 
> > -----Original Message-----
> > From: Andrew Sharp [mailto:andy.sharp@lsi.com] 
> > Sent: Thursday, February 04, 2010 1:36 PM
> > To: Kwan, Ed
> > Subject: Re: Additional code change for TED 27764 Change ICW to
> > require local date and time, and optionally ask for NTP
> > 
> > On Thu, 4 Feb 2010 12:54:21 -0700 "Kwan, Ed" <Ed.Kwan@lsi.com>
> > wrote:
> > 
> > > FYI, I added 3 files to change 34314 for ICW/FTI WebUI:
> > > 
> > > //depot/dev/nfx-tree/code/ssc-webui/ONStor/js/fti/util.js#1 - edit
> > > default change
> > > (text) //depot/dev/nfx-tree/code/ssc-webui/UIT/js/fti/util.js#1 -
> > > edit default change
> > > (text) //depot/dev/nfx-tree/code/ssc-webui/js/fti/init.js#18 -
> > > edit default change (text)
> > > 
> > 
> > 
> > nfx-tree/code/sm-sct/Makefile
> > 
> > 
> >      looks good
> > 
> > 
> > nfx-tree/code/ssc-initial-config/initial-config.c
> > 
> > 
> >      kudos on the code reuse, i've been meaning to mention that.
> > 
> > 
> > nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_ntp.txt
> > 
> > 
> >      ok
> > 
> > nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_ntp_reset.txt
> > 
> > 
> >      >>add
> >      nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_ntp_reset.txt
> > 
> > 
> > nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_ntp_server.txt
> > 
> > 
> >      looks good
> > 
> > 
> > nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_show_ntpservers.txt
> > 
> > 
> >      >>add
> >      nfx-tree/code/ssc-nfxsh/agile-man/help_system_time_show_ntpservers.txt
> > 
> > 
> > nfx-tree/code/ssc-nfxsh/cmd_system.c
> > 
> > 
> >      lines 2214 - 2224 ok, so maybe put some comments in concerning
> >      dflag variable; and the (fact?) that tk_disable_ntp()
> > apparently resets the config file to default config, despite its
> > name not indicating that.
> > 
> > [EDK] I added the following comments:
> > 
> >    2224     if (tk_disable_ntp() == NFX_OK) {
> >    2225         if (!dflag) {
> >    2226             /*  tk_disable_ntp() calls tk_reset_ntp_cfg() to
> > copy 2227              *  /onstor/etc/ntp.conf.template
> > to /etc/ntp.conf, and 2228              *  ends up with the local
> > ntp server 127.127.1.0 only. 2229              *  So, if we don't
> > want to delete (!dflag) all ntp servers, 2230              *  we
> > call tk_set_default_ntp_cfg() to copy the default ntp
> > 2231              * servers from /onstor/etc/ntp.default
> > 2232              */ 2233             tk_set_default_ntp_cfg();
> >    2234         }
> >    2235         tk_restart_ntpd();
> >    2236         rc = CMD_SUCCESS;
> >    2237     }
> > 
> > nfx-tree/code/ssc-nfxsh/linux.h
> > 
> >      ok
> > 
> > nfx-tree/code/ssc-nfxsh/openbsd.h
> > 
> > 
> >      i thought we already had ntpdate is some normal location on
> >      bsd builds?  not in /usr/local/bin in other words.
> > 
> > [EDK]  The binary is indeed in /usr/local/bin:
> > [edk@edk-linux opt]$ tar zvtf EverON-3.3.3.12BC.tar.gz | fgrep
> > ntpdate -rwxr-xr-x /            338155 2009-12-11
> > 16:10:22 ./usr/local/bin/ntpdate lrwxrwxrwx /                 0
> > 2009-12-11 16:10:22 ./usr/local/sbin/ntpdate -> ../bin/ntpdate
> > 
> > nfx-tree/code/ssc-nfxsh/vtysh_initial.c
> > 
> >      line 368, changing to dataType is a good start, but hey, no
> >      studly caps, OK?  and you might want to think about using a
> > switch statement too.  i'm just sayin.
> > 
> >      line 777 what does the comment mean?
> > 
> > [EDK]
> >     777         /* Not setting the NTP server in ICW
> >     778          */
> >     779         bzero(conf->ntp, sizeof(conf->ntp));
> > 
> > Instead of removing the conf->ntp field and all references to it,
> > I'm just bzero'ing the string as a short cut.
> > 
> >      line 783-866 indentation is broken even more than it was
> >      before. yeah.
> > 
> > [EDK] No, I did not change the indentation.
> > 
> > nfx-tree/code/ssc-timekeeper/Makefile
> > 
> >      ok
> > 
> > 
> > nfx-tree/code/ssc-timekeeper/ntp.default
> > 
> > 
> >      >>add nfx-tree/code/ssc-timekeeper/ntp.default
> > 
> >      i'm just not even looking at this, i'm sick of it, and it's
> > broken in my opinion, so yeah, go ahead.  yee scurvy dogs.
> > 
> > 
> > nfx-tree/code/ssc-timekeeper/ntp_utils.c
> > 
> >      line 549  ok, then you need to change nfxsh to call this in
> > that function that takes a '-d' option, but is supposed to reset the
> >      config to the default otherwise.  it only calls
> > tk_ntp_disable().
> > 
> > [EDK]  I think it's working fine.  Think "-d" as "delete
> > everything".
> > 
> > nfx-tree/code/ssc-timekeeper/timekeep-api.h
> > 
> > 
> >      looks good
> > 
> > 
> > nfx-tree/code/ssc-webui/ONStor/js/fti/util.js
> > 
> >      ok, how'd you like to help out with "new employee training"?
> > have ankur take a look at these javascript changes.  it's all greek
> >      to me.
> > 
> > nfx-tree/code/ssc-webui/UIT/js/fti/util.js
> > 
> >      line 1586 did you add tws??  strangely, this file looks exactly
> >      like the one before it?  ah, this is the UIT one, heh.  yeah.
> > 
> > [EDK] not TWS but EOL before EOF.  I think it's a Windows vs Unix
> > thing.
> > 
> > nfx-tree/code/ssc-webui/WebHelp/Clearing_or_Disabling_an_NTP_Server.htm
> > 
> >      yeesh, talk about hard-to-read-html...but looks ok i guess
> > 
> > 
> > nfx-tree/code/ssc-webui/WebHelp_source/Clearing_or_Disabling_an_NTP_Server.htm
> > 
> >      As long as we're hard coding the default servers, we might as
> > well list them in this message so a sysadmin can decide if that's
> > the right option for him or her.
> > 
> > [EDK] I plan to ask DennisA to update the SysAdmin Guide.
> > 
> > nfx-tree/code/ssc-webui/js/fti/init.js
> > 
> >      greek
> > 
> > nfx-tree/code/ssc-webui/js/ntp/edit.js
> > 
> > 
> >      this could all be OK, i don't know...sure check it in
> > 
> > 
> > nfx-tree/code/ssc-webui/js/ntp/json.js
> > 
> >      greek
> > 
