X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C82CA2.2EEF90BC@onstor-exch02.onstor.net>; Wed, 21 Nov 2007 16:54:06 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: Please review code change for install script
Date: Wed, 21 Nov 2007 16:54:05 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E06B7A944@onstor-exch02.onstor.net>
In-Reply-To: <20071121164740.7b91e262@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Please review code change for install script
Thread-Index: AcgsoUoiCGlxvcyST0C0h+knQJjf6AAANbww
References: <BB375AF679D4A34E9CA8DFA650E2B04E06B7A8B3@onstor-exch02.onstor.net> <20071121164740.7b91e262@ripper.onstor.net>
From: "Ed Kwan" <ed.kwan@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>

[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
>=20
> Please send me the pending changelist number.
>=20
> Thanks,
>=20
> a
>=20
>=20
> On Wed, 21 Nov 2007 14:43:24 -0800 "Ed Kwan" <ed.kwan@onstor.com>
wrote:
>=20
> > 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)
> >
> > =3D=3D=3D=3D //depot/r320rel/nfx-tree/Tools/cw_install.in#1 -
> > /homes/edk/p4/r320rel/nfx-tree/Tools/cw_install.in =3D=3D=3D=3D
> > ***************
> > *** 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" =3D "/" -o "$tdir" =3D "/usr" =
-o
> > "$tdir" =3D "/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" =3D "$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" !=3D "/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=3D`get_free_space "$p"`
> > !               if [ $a -gt $fkb ] ; then
> >                         d=3D`expr $a - $fkb`
> >                         if [ $d -ge 10240 ] ; then
> >                                 # 10 MB is enough, we're out of here
> > --- 499,505 ----
> >                         fi
> >                 fi
> >                 a=3D`get_free_space "$p"`
> > !               if [ "$a" -gt $fkb ] ; then
> >                         d=3D`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=3D$?
> > !               remount_ro $tdir
> >         fi
> >
> >         return $err
> > --- 576,584 ----
> >                 cw "get_distball ftp '$url' $tdir"
> >                 get_distball ftp "$url" $tdir
> >                 err=3D$?
> > !                 if [ "$tdir" =3D "/" -o "$tdir" =3D "/usr" -o =
"$tdir"
=3D
> > "/usr/local/agile" ] ; then
> > !                         remount_ro $tdir
> > !                 fi
> >         fi
> >
> >         return $err
> >
