From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?=D6rjan_Petersson?= Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: 5.1.b PK4 installation bug/question Date: Sat, 19 Nov 2005 20:15:43 +0100 Organization: Logcode SARL Message-ID: <010d01c5ed3d$acbef1b0$3800010a@syrah> References: <5F7F0592BBC6724FBC59D177A6FECA7401D99E31@broexc03.emea.cpqcorp.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1132427961 9075 80.91.229.2 (19 Nov 2005 19:19:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 Nov 2005 19:19:21 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Sat Nov 19 20:19:20 2005 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by ciao.gmane.org with smtp (Exim 4.43) id 1EdYD6-0001K6-UL for gotm-tru64-unix-managers@gmane.org; Sat, 19 Nov 2005 20:17:17 +0100 Original-Received: (qmail 28357 invoked by uid 49509); 19 Nov 2005 19:16:59 -0000 Original-Sender: tru64-unix-managers-owner@ornl.gov Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 28342 invoked by uid 49501); 19 Nov 2005 19:16:59 -0000 Original-Received: from 160.91.4.119 by sws1 (envelope-from , uid 49491) with qmail-scanner-1.25 (clamdscan: 0.83/743. spamassassin: 3.0.2. Clear:RC:0(160.91.4.119):SA:0(-2.6/5.0):. Processed in 0.490155 secs); 19 Nov 2005 19:16:59 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 Original-Received: from emroute1.cind.ornl.gov (160.91.4.119) by sws1.ornl.gov with SMTP; 19 Nov 2005 19:16:58 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2-1x9 #31038) with ESMTP id <0IQ700BKIUWAUV@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Sat, 19 Nov 2005 14:16:58 -0500 (EST) Original-Received: from VIRUSCAN-DAEMON.emroute1.cind.ornl.gov by emroute1.cind.ornl.gov (PMDF V6.2-1x9 #31038) id <0IQ700502UW2N3@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Sat, 19 Nov 2005 14:16:58 -0500 (EST) Original-Received: from maileuz.sivit.org (maileuz.sivit.org [194.146.224.64]) by emroute1.cind.ornl.gov (PMDF V6.2-1x9 #31038) with ESMTP id <0IQ7003A4UVY4L@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Sat, 19 Nov 2005 14:16:50 -0500 (EST) Original-Received: from localhost (localhost [127.0.0.1]) by maileuz.sivit.org (Postfix) with ESMTP id AFB494921 for ; Sat, 19 Nov 2005 20:21:59 +0100 (CET) Original-Received: from maileuz.sivit.org ([127.0.0.1]) by localhost (maileuz.sivit.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27842-112 for ; Sat, 19 Nov 2005 20:21:53 +0100 (CET) Original-Received: from syrah (unknown [81.22.92.230]) by maileuz.sivit.org (Postfix) with ESMTP id 0BF5148FE for ; Sat, 19 Nov 2005 20:21:47 +0100 (CET) In-reply-to: <5F7F0592BBC6724FBC59D177A6FECA7401D99E31@broexc03.emea.cpqcorp.net> Original-To: tru64-unix-managers@ornl.gov X-Envelope-from: orjan.petersson@logcode.com X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on spam2.ornl.gov X-Spam-Level: ** X-Qmail-Scanner-MOVED-X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_00,ORNL_VERT_MSGID autolearn=no version=3.1.0 X-Virus-Scanned: by amavis at maileuz.sivit.org Xref: news.gmane.org gmane.os.tru64.managers:8650 Archived-At: Johan Brusche suggested running 'doconfig -c New-HOSTNAME'. This certainly fixed the problem (thanks Johan) but I still think there = is a bug in dupatch... Also, the "best practice document "Changing the Host Name = Permanently" does not mention that a kernel rebuild is necessary.=20 --=20 =D6rjan > From: Brusche, Johan [mailto:johan.brusche@...] [...] >=20 > The correct solution is to run 'doconfig -c New-HOSTNAME', copy the = new kernel in place > and reboot.. The HOSTNAME is also stored in the kernel. Having = another hostname in the > kernel would also cause problems when logging in on the graphics = console, especially DT ToolTalk > will fail on it. >=20 My original question: >=20 > Hi, > I have found a small bug in the /usr/sbin/dupatch delivered as part of = 5.1.b PK4. > The version is > # @(#)$RCSfile: dupatch.sh,v $ $Revision: 1.1.2.56 $ (DEC) $Date: = 2004/06/07 14:40:21 $ >=20 > and the problem is the following function: >=20 > FitsetSetup() > { > PWD=3D`pwd` >=20 > DEF_USRRSV=3D40960 > DEF_ROOTRSV=3D15360 >=20 > DUK=3D > HOSTNAME=3D`/usr/sbin/rcmgr get HOSTNAME` > [ "$HOSTNAME" ] && > { > HOSTNAME=3D`Parse . $HOSTNAME | awk '{print $1}'` > HOSTNAME=3D`Ucase $HOSTNAME` > [ -d /usr/sys/$HOSTNAME ] && > { > cd /usr/sys/$HOSTNAME > DUK=3D`du -sk . | awk '{print $1}'` > } > } > DUK=3D`expr $DUK \* 2` > USRRSV=3D`FitsetReserve $DEF_USRRSV $DUK` >=20 > DUK=3D > [ -f /vmunix ] && > { > cd / > DUK=3D`du -sk vmunix | awk '{print $1}'` > } > ROOTRSV=3D`FitsetReserve $DEF_ROOTRSV $DUK` >=20 > cd $PWD >=20 > } >=20 > Here DUK is first set to "" and it is only if /usr/sys/$HOSTNAME = exists that it get > changed to something else. The hostname on the machine I am patching = has been changed > and I do not have /usr/sys/$HOSTNAME, only /usr/sys/$THE_OLD_HOSTNAME, = so the result > is that the statement > DUK=3D`expr $DUK \* 2` > fails with a syntax error. >=20 > I can fix this problem in various ways, e.g. rename = /usr/sys/$THE_OLD_HOSTNAME to > /usr/sys/$HOSTNAME or simply set DUK to something sensible in the = script, but I > would like to know if there is any "correct" way of doing this (or if = there are > any gotchas). >=20 > -- > Best regards, > =D6rjan Petersson, Logcode SARL, currently with Ericsson Algeria > 24, rue de la Charli=E8re, FR-42270 St-Priest-en-Jarez, France > Phone: +33-4.77.79.65.14, Mobile: +33-6.62.25.37.94 > In Algeria: +213-61.699.745, In Sweden: +46-705 135 998 >=20 >=20 >=20 >=20 >=20