AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:exch1.onstor.net
NSV:
SSH:
R:<larry.scheer@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	2779531E7C760D4491C96305019FEEB5175D6201F4@exch1.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 25 Nov 2008 10:53:06 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: Larry Scheer <larry.scheer@onstor.com>
Subject: Re: Please review change 31233 scripts to help with creating rootfs
Message-ID: <20081125105306.64ec389b@ripper.onstor.net>
In-Reply-To: <2779531E7C760D4491C96305019FEEB5175D6201F4@exch1.onstor.net>
References: <2779531E7C760D4491C96305019FEEB5175D6201F4@exch1.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

On Mon, 24 Nov 2008 13:51:35 -0800 Larry Scheer
<larry.scheer@onstor.com> wrote:

> Andy,
>         I wrote a couple of scripts to reduce the number of manual
> steps I take when I create a root file system. I used these to create
> the rootfs used in r401 and dev branches. Would you please review
> them.
> 
> These files are in my workspace mounted on ripper
> as /home/larrys/perforce/trees/dev.
> 
> Change 31233 by larrys@larrys-r14-dmip on 2008/11/20 15:04:05
> *pending*
> 
>          New files to reduce the manual steps of creating the root
> filesystem from scratch.
>            - new-rootfs.sh do the steps to create a developers and
> production root filesystem to use with debootstrap
>            - cleanup-newrootfs.sh do the final cleanup and
> verification of the freshly configured root file system.
> 
> Affected files ...
> 
> ... //depot/dev/linux/pkg-tools/cleanup-newrootfs.sh#1 add
> ... //depot/dev/linux/pkg-tools/new-rootfs.sh#1 add



= Change 31233 by larrys@larrys-r14-dmip on 2008/11/20 15:04:05 *pending*
= 
= 	 New files to reduce the manual steps of creating the root filesystem
= 	 from scratch.
= 	   - new-rootfs.sh do the steps to create a developers and production
= 	     root filesystem to use with debootstrap
= 	   - cleanup-newrootfs.sh do the final cleanup and verification of
= 	     the freshly configured root file system.
= 

linux/pkg-tools/cleanup-newrootfs.sh

     >>add linux/pkg-tools/cleanup-newrootfs.sh

     line 33-36, i would suggest meaningful names for these variables
     so that the code is readable, or don't even bother with them, they
     just make the code harder to read, and therefore, to maintain.
     for instance, i have no idea what line 68 does.

     line 67, just do find -exec rm '{}' \;  there will never be more
     than a handfull

     line 83, make that "lib/modules", and anyway, can't you just
     automate that for the user, which is yourself?

     line 89, OK, I give up, what is memu?

     line 95 and 99 and other places, put a space at the end of the
     prompt, also, do echo -n to leave the cursor on the same line.
     looks nicer and is easier to see whats going on.



linux/pkg-tools/new-rootfs.sh

     >>add linux/pkg-tools/new-rootfs.sh

     line 42, typo, should be wheredafugaaaaaawee

     i'm not even going to read this one, it's your script.  but hey,
     what's with the piping it to itself | itself -dork | itself -wad
     | itself -enoughalready?  who do you think you are, support.sh
     or something?  make it one program, no piping it to itself and
     shiiite.  remember that shell functions have the exact semantics
     of any shell command, so you can pipe inta and outa them just
     the same.

