From owner-freebsd-questions@FreeBSD.ORG Sun Aug 31 13:25:23 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88F4116A4BF for ; Sun, 31 Aug 2003 13:25:23 -0700 (PDT) Received: from remt30.cluster1.charter.net (remt30.cluster1.charter.net [209.225.8.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1B2243FBD for ; Sun, 31 Aug 2003 13:25:21 -0700 (PDT) (envelope-from chowse@charter.net) Received: from [66.168.145.25] (HELO moe) by remt30.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 10889723; Sun, 31 Aug 2003 16:25:20 -0400 From: "Charles Howse" To: "'ODHIAMBO Washington'" Date: Sun, 31 Aug 2003 15:25:11 -0500 Message-ID: <001901c36ffd$fb0c4440$04fea8c0@moe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <20030831100339.GG30047@ns2.wananchi.com> X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal cc: freebsd-questions@freebsd.org Subject: RE: scripting the buildworld/installworld process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2003 20:25:23 -0000 > > I'll be glad to post the scripts for review if anyone's interested. >=20 >=20 > I'll take a look and test them for you also. OK, any input or corrections welcome. I definitly would be interested in more error checking and reporting, and I'm thinking about using \time to append the=20 time it takes the long utilities to run to a file for comparison purposes. ------ This is the first one ------ #!/usr/local/bin/bash # # Update the system, run in multi-user mode echo -n "Have you read /usr/src/UPDATING? [y/n]: " read a if [ $a =3D n ] ; then less /usr/src/UPDATING exit fi echo -n "Have you merged /etc/group and /usr/src/etc/group? [y/n]: " read b if [ $b =3D n ] ; then diff -c /etc/group /usr/src/etc/group | less exit fi echo -n "Have you merged /etc/master.passwd and /usr/src/etc/master.passwd? [y/n]: " read c if [ $c =3D n ] ; then diff -c /etc/master.passwd /usr/src/etc/master.passwd exit fi # copy my customized make.conf cp /disk2/larry/etc/make.conf /etc # copy my customized kernel config file cp /disk2/larry/usr/src/sys/i386/conf/CUSTOM /usr/src/sys/i386/conf echo -n "Clean out /usr/obj? [y/n]: " read d if [ $d =3D y ] ; then cd /usr/obj chflags -R noschg * rm -rf * fi echo -n "Continue with build? [y/n]: " read e if [ $e =3D n ] ; then exit fi cd /usr/src make -j4 buildworld make buildkernel KERNCONF=3DGENERIC make installkernel KERNCONF=3DGENERIC cp /boot/kernel /boot/kernel.GENERIC make buildkernel KERNCONF=3DCUSTOM make installkernel KERNCONF=3DCUSTOM echo "Reboot to single user mode and run /disk2/larry/bin/update2" Exit ------ This is the second one ------ #!/usr/local/bin/bash # # Update the system, run in single user mode echo -n "Continue with installworld? [y/n]: " read a=20 if [ $a =3D n ] ; then exit fi make installworld if [ -d /etc.old ] ; then rm -r /etc.old fi =20 cp -Rp /etc /etc.old /usr/sbin/mergemaster -a cd /dev ./MAKEDEV all cd /usr/src/release/sysinstall make clean make all install echo "Finished! Do ps and top work?" Exit > > 2. After reading man mergemaster, I see that the -a flag will run > > mergemaster automatically and leave any new files in=20 > /var/tmp/temproot. > > I'd like to confirm that if I opt to run mergemaster -a,=20 > then I should > > check/merge any files before leaving single user mode. It=20 > seems like > > the right thing to do...? >=20 > Correct, but I'll advise you run mergemaster manually. Margemaster is > such a dangerous thing to run with -a on a system that has had so > many mods to /etc When I upgraded from 4.8-p3 to p4 recently, I ran mergemaster manually. The only file I had to make a decision on was (I forget the name) the one that prints the uname information when booting. Just for the sake of discussion, let's say I did opt to run mergemaster -a. All I would have to do is check every file in /var/tmp/temproot and be sure it didn't break anything by overwriting the older version, correct?