Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start up routines

Status
Not open for further replies.

Loonygirl

Technical User
Jun 9, 2004
66
GB
I'm running Tru64 Unix. My network is running at 100 MPS half duplex, the box itself is running at 10 half, which is causing severe clashes.

I can change the speed of the tru64 box using lan_config. However the network needs to be rebooted before the changes take effect (I think...please correct me if I'm wrong!!). My GUI had crashed, so I decided to restart the whole server. Checking the messages file, I saw that auto negotiation was off, and the box was forced to run at 10 half. This is obviously written into a start up routine somewhere....I'm totally new to Unix. Where do I look to find the file which specifies these settings??

I also need to add a couple of settings into this file - one is to add a default gateway (otherwise I have to add it manually everytime I start the box up, and I keep forgetting to!!!!). Can I just add "route add default 192.168.44.1" to the file as is??

Thanks,

Sarah
 
Hopefully man rc will give you some info on startup routines.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi Sarah,

It would help if you could post what the hardware is. Assuming it is an Alpha, then the Ethernet speed setting is done at the chevrons (>>> ). If you have a DE500 Ethernet adapter (like our systems), then use:
>>> set ewa0_mode twisted-pair (for 10mBit
>>> set ewa0_mode fast (for 100mBit

I can post further examples and explanations later if your hardware is similar to ours.

If you want to check the current setting try:
consvar -g ewa0_mode

To add a default gateway, edit the file /etc/routes and add the line (NB no leading spaces):
default <gateway-ip-address>


I hope that helps you.

Mike
 
Hi,

man rc doesn't work??

Forgive me for being very dumb here!!
when I do cat /etc/routes, I'm just dropped back to the # prompt. This is (I assume) because the file itself is empty?

#cat /etc/routes
#

If I vi and add the line
default 192.168.44.1

everything should be happy??

ewa0_mode isn't found.

Hardware: the only thing I can tell you is out of my messages file:

tu0: DEC TULIP (10/100) Ethernet Interface
tu0: autonegotiation off: selecting 10BaseT (UTP)port: half duplex

This always comes up when the server is rebooted, no matter what I set the setting to before I reset, therefore it must be stored somewhere?


Thanks for the advice so far!!

Sarah
 
Hi Ken,

No.../etc/defaultrouter does not exist in my version of Tru64.

Incidentally....I forgot to post all the info on the hardware itself:

Aug 9 07:54:57 Oskar vmunix: tu0: DECchip 21140: Revision: 2.2
Aug 9 07:54:57 Oskar vmunix: tu0: auto negotiation capable device
Aug 9 07:54:57 Oskar vmunix: tu0 at pci0 slot 3
Aug 9 07:54:57 Oskar vmunix: tu0: DEC TULIP (10/100) Ethernet Interface, hardwa
re address: 00-00-F8-10-CC-B1
Aug 9 07:54:57 Oskar vmunix: tu0: auto negotiation off: selecting 10BaseT (UTP)
port: half duplex
 
man rc doesn't work??

well, in Tru64, it's
man rc3

and see also: man rc2, man rc0

 
well, in Tru64, it's
man rc3

and see also: man rc2, man rc0


Thanks :eek:)

Was following stuff through via S11gateway -> /sbin/rc3.d
which appeared to be a whole load of C code....
One of the variables NEWGATED pointed towards /usr/sbin/gated, but this file is a load of jargon.

I'm not a programmer....am I meant to be editing this code? Because going by the code which I normally produce, this would not be a good idea ;o)

Sarah
 
Sarah,

no, /sbin/rc3.d/S11gateway is not C code; it's a shell script.
And no, I would not suggest that you edit this code.

But one way to overcome the problems you described in your initial post would be this:
Put all those commands you now have to enter manually after booting in a file, and make sure that this file is executed when booting.
To achieve this, you may call this file /sbin/rc3.d/S99mysettings.

This should work, but nevertheless there should be a way to change your config files, so that this additional work will not be necessary.

regards
 
Hi hoinz,

Thanks for the help!

I have an S99 already, so I assume I can use any number as long as it isn't taken.

If I use this file:

route add default 192.168.44.1
lan_config -i tu0 -s100

and save as /sbin/rc3.d/298mysettings

This will all happen at boot up and everything should be ok?

I'm still interested as to where the computer is picking up the settings for the network speed from - I'm surprised that auto-negotitation has been turned off - so if anyone has any ideas, please let me know!!

Thanks,

Sarah
 
and save as /sbin/rc3.d/298mysettings

shouldn't this be
/sbin/rc3.d/S98mysettings
?
 
Um....yes....maybe! :)

So, the above should be ok if I add it? (I'm bound to add something silly otherwise which sends the box into an infinite loop !)

Thanks,

Sarah
 
yes
(and don't forget chmod to make the file executable)
 
...and there's no reason you shouldn't use S99 again, if there are two S99's the one first alphabetically will be executed first, followed by the second. However, S98 will do as well, don't want to muddy the waters further!! Good luck.
 
hoinz,

yes, I looked at the manual and got it to be executable with a different set of commands ;)

In future I will always read the manual before posting dodgy commands!!

Ken - thanks, that's good to know in the future!
Is S99 the highest that you can go? Or is it possible to have S100 etc?

Sarah
 
Sarah, glad to help. S99 is the highest you should go to as the names are (as far as I know) ordered in ASCII character value, therefore 100 would actually some before 99 in these terms. As an aside, the S indicates Start me at boot up, while a K before a script in /etc/rc? indicates Kill me at shutdown. Replacing S or K with a lower case version essentially deactivates the script at startup/shutdown.
 
Ah right, thanks.
I knew S was start up and K was shutting down, but I couldn't work out what the K actually stood for :)

Cheers for all your help everyone.
Server will be rebooted over the weekend, so we'll see whether my changes have produced the correct effect or not!!



Sarah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top