tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Örjan Petersson" <orjan.petersson@logcode.com>
Subject: SUMMARY: 5.1.b PK4 installation bug/question
Date: Sat, 19 Nov 2005 20:15:43 +0100	[thread overview]
Message-ID: <010d01c5ed3d$acbef1b0$3800010a@syrah> (raw)
In-Reply-To: <5F7F0592BBC6724FBC59D177A6FECA7401D99E31@broexc03.emea.cpqcorp.net>

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. 
-- 
 Örjan
> From: Brusche, Johan [mailto:johan.brusche@...]
[...]
> 
> 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.
> 

My original question:

> 
> 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 $
> 
> and the problem is the following function:
> 
> FitsetSetup()
> {
>         PWD=`pwd`
> 
>         DEF_USRRSV=40960
>         DEF_ROOTRSV=15360
> 
>         DUK=
>         HOSTNAME=`/usr/sbin/rcmgr get HOSTNAME`
>         [ "$HOSTNAME" ] &&
>         {
>                 HOSTNAME=`Parse . $HOSTNAME | awk '{print $1}'`
>                 HOSTNAME=`Ucase $HOSTNAME`
>                 [ -d /usr/sys/$HOSTNAME ] &&
>                 {
>                         cd /usr/sys/$HOSTNAME
>                         DUK=`du -sk . | awk '{print $1}'`
>                 }
>         }
>         DUK=`expr $DUK \* 2`
>         USRRSV=`FitsetReserve $DEF_USRRSV $DUK`
> 
>         DUK=
>         [ -f /vmunix ] &&
>         {
>                 cd /
>                 DUK=`du -sk vmunix | awk '{print $1}'`
>         }
>         ROOTRSV=`FitsetReserve $DEF_ROOTRSV $DUK`
> 
>         cd $PWD
> 
> }
> 
> 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=`expr $DUK \* 2`
> fails with a syntax error.
> 
> 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).
> 
> --
> Best regards,
> Örjan Petersson, Logcode SARL, currently with Ericsson Algeria
> 24, rue de la Charlière, 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
> 
> 
> 
> 
> 





           reply	other threads:[~2005-11-19 19:15 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <5F7F0592BBC6724FBC59D177A6FECA7401D99E31@broexc03.emea.cpqcorp.net>]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox