AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20071121170424.7ad58144@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<ed.kwan@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E06B7A944@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Wed, 21 Nov 2007 17:04:47 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Ed Kwan" <ed.kwan@onstor.com>
Subject: Re: Please review code change for install script
Message-ID: <20071121170447.457b4257@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E06B7A944@onstor-exch02.onstor.net>
References: <BB375AF679D4A34E9CA8DFA650E2B04E06B7A8B3@onstor-exch02.onstor.net>
	<20071121164740.7b91e262@ripper.onstor.net>
	<BB375AF679D4A34E9CA8DFA650E2B04E06B7A944@onstor-exch02.onstor.net>
Organization: Onstor
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

Well, you should have had me review the first checkin, integrates like
this are annoying because you can't really do a diff.  Anyway, I'm sure
it's fine.

In the findspace function, just add a '>/dev/tty' to those two echo
statements to prevent their output being used by the caller.

Cheers,

a

On Wed, 21 Nov 2007 16:54:05 -0800 "Ed Kwan" <ed.kwan@onstor.com> wrote:

> [edk@edk-linux ~]$ p4 describe 26482
> Change 26482 by edk@edk-r320rel on 2007/11/21 16:46:51 *pending*
> 
>         Integrating change 26480 from the dev tree to R98:
>                    Modified the script to work better when the filer
> is already running 3.x:
>                    1.  The /usr/local/agile mount point does not exist
> in 3.x
>                    2.  Don't try to remount /var as read-only
> 
> Affected files ...
> 
> ... //depot/r320rel/nfx-tree/Tools/cw_install.in#1 integrate
> 
> 
> > -----Original Message-----
> > From: Andy Sharp
> > Sent: Wednesday, November 21, 2007 4:48 PM
> > To: Ed Kwan
> > Subject: Re: Please review code change for install script
> > 
> > Please send me the pending changelist number.
> > 
> > Thanks,
> > 
> > a
> > 
> > 
> > On Wed, 21 Nov 2007 14:43:24 -0800 "Ed Kwan" <ed.kwan@onstor.com>
> wrote:
> > 
> > > Hi Andy,
> > >
> > > I'm integrating the code change from the dev branch to the R98
> branch.
> > > It's the same changes I have from last month, which I just checked
> in
> > > after BrianN did some testing.
> > > This is for a couple of issues when the customer uses the install
> > > script in 3.x to upgrade.
> > >
> > > Thanks,
> > > Ed
> > >
> > >
> > > [edk@edk-linux Tools]$ p4 info
> > > User name: edk
> > > Client name: edk-r320rel
> > > Client host: edk-linux.onstor.net
> > > Client root: /homes/edk/p4/r320rel
> > > Current directory: /homes/edk/p4/r320rel/nfx-tree/Tools
> > > Client address: 10.0.0.137:51841
> > > Server address: liszt.onstor.net:1717
> > > Server root: /p4data/p4root
> > > Server date: 2007/11/21 14:28:43 -0800 PST
> > > Server version: P4D/LINUX26X86_64/2007.2/122958 (2007/05/23)
> > > Server license: ONStor 40 users (support expired 2007/07/03)
> > >
> > > ==== //depot/r320rel/nfx-tree/Tools/cw_install.in#1 -
> > > /homes/edk/p4/r320rel/nfx-tree/Tools/cw_install.in ====
> > > ***************
> > > *** 238,244 ****
> > >                         rm "${tdir}/${tball}" || {
> > >                                 record "Failed to remove
> > > ${tdir}/${tball} on cleanup - remove by hand if possible."
> > >                         }
> > > !                       remount_ro "$tdir"
> > >                 } || {
> > >                         record "Failed to remove ${tdir}/${tball}
> > > on cleanup - remove by hand if possible."
> > >                 }
> > > --- 238,246 ----
> > >                         rm "${tdir}/${tball}" || {
> > >                                 record "Failed to remove
> > > ${tdir}/${tball} on cleanup - remove by hand if possible."
> > >                         }
> > > !                         if [ "$tdir" = "/" -o "$tdir" = "/usr"
> > > -o "$tdir" = "/usr/local/agile" ] ; then
> > > !                                 remount_ro "$tdir"
> > > !                         fi
> > >                 } || {
> > >                         record "Failed to remove ${tdir}/${tball}
> > > on cleanup - remove by hand if possible."
> > >                 }
> > > ***************
> > > *** 465,470 ****
> > > --- 467,473 ----
> > >         df -k | grep '^/dev' | while read dev sz used avail crack
> > > mpt ; do
> > >                 if [ "$mpt" = "$fs" ] ; then
> > >                         echo $avail
> > > +                         break
> > >                 fi
> > >         done
> > >   }
> > > ***************
> > > *** 486,492 ****
> > >                         echo "Attempting to remove it..."
> > >                         if remount_rw $p ; then
> > >                                 rm -f $p/$tball
> > > !                               remount_ro $p
> > >                                 echo Done.
> > >                         else
> > >                                 record "Could not remove it.
> > > Remove it by hand if possible."
> > > --- 489,497 ----
> > >                         echo "Attempting to remove it..."
> > >                         if remount_rw $p ; then
> > >                                 rm -f $p/$tball
> > > !                                 if [ "$p" != "/var" ]; then
> > > !                                         remount_ro $p
> > > !                                 fi
> > >                                 echo Done.
> > >                         else
> > >                                 record "Could not remove it.
> > > Remove it by hand if possible."
> > > ***************
> > > *** 494,500 ****
> > >                         fi
> > >                 fi
> > >                 a=`get_free_space "$p"`
> > > !               if [ $a -gt $fkb ] ; then
> > >                         d=`expr $a - $fkb`
> > >                         if [ $d -ge 10240 ] ; then
> > >                                 # 10 MB is enough, we're out of
> > > here --- 499,505 ----
> > >                         fi
> > >                 fi
> > >                 a=`get_free_space "$p"`
> > > !               if [ "$a" -gt $fkb ] ; then
> > >                         d=`expr $a - $fkb`
> > >                         if [ $d -ge 10240 ] ; then
> > >                                 # 10 MB is enough, we're out of
> > > here ***************
> > > *** 571,577 ****
> > >                 cw "get_distball ftp '$url' $tdir"
> > >                 get_distball ftp "$url" $tdir
> > >                 err=$?
> > > !               remount_ro $tdir
> > >         fi
> > >
> > >         return $err
> > > --- 576,584 ----
> > >                 cw "get_distball ftp '$url' $tdir"
> > >                 get_distball ftp "$url" $tdir
> > >                 err=$?
> > > !                 if [ "$tdir" = "/" -o "$tdir" = "/usr" -o
> > > "$tdir"
> =
> > > "/usr/local/agile" ] ; then
> > > !                         remount_ro $tdir
> > > !                 fi
> > >         fi
> > >
> > >         return $err
> > >
