Computing.Net > Forums > Solaris > script in /etc/rc2.d

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

script in /etc/rc2.d

Reply to Message Icon

Name: Jay-Fu
Date: October 10, 2002 at 16:02:59 Pacific
OS: Sol8
CPU/Ram: 260/256
Comment:

Hello,

Recently I was having trouble with netscape unable to download webpages. I've solved the problem with "#ifconfig hme0 mtu 1492" command. The problem is that everytime I reboot, the setting is reset back to what it was? I am not familiar with scripting, but I believe you can put a script in the /etc/rc2.d dir to make the change permanet?? Does anyone have a similar script that I can use or can help with this issue?

Thanks alot,



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: October 11, 2002 at 05:04:05 Pacific
Reply:

Look at the file "/etc/rc2.d/S69inet". Line 309 is bringing up each of the network interfaces. You might try addind that line there.

295 interface_names="`/usr/bin/ls /etc/hostname.ip*.*[0-9] 2>/dev/null | \
296 /usr/bin/grep '/etc/hostname\.ip6\{0,1\}\.'`"
297 if [ -n "$interface_names" ]; then
298 (
299 echo "configuring IPv4 tunnels:\c"
300 # Extract the part after the first '.'
301 set -- `for intr in $interface_names; do \
302 /usr/bin/expr //$intr : '[^.]*\.\(.*\)$'; done`
303 while [ $# -ge 1 ]; do
304 # Skip empty files
305 if [ ! -s /etc/hostname\.$1 ]; then
306 shift
307 continue
308 fi
309 /usr/sbin/ifconfig $1 plumb 2>&1 >/dev/null
310 while read ifcmds; do
311 if [ -n "$ifcmds" ]; then
312 /usr/sbin/ifconfig $1 inet $ifcmds \
313 2>&1 >/dev/null
314 fi
315 done 316 echo " $1\c"
317 shift
318 done
319 echo "."
320 )
321 fi


0

Response Number 2
Name: Jay-Fu
Date: October 11, 2002 at 07:57:10 Pacific
Reply:

David,

Thanks for you reply. But I am not sure what I'm suppose to put in??? I need some more help. Thanks


0

Response Number 3
Name: Amir Efrat
Date: October 11, 2002 at 09:38:36 Pacific
Reply:

No problem,
Just create the script that runs whatever u want it to and put it into /etc/init.d/scriptname
link it to /etc/rc2.d/Sscriptname
this will run the script with start parameter each time the system boots.


0

Response Number 4
Name: Jay-Fu
Date: October 11, 2002 at 11:22:49 Pacific
Reply:

Amir,

Hey, thanks for the reply. The thing is that i've never script'd before, so I don't have any idea on how to do this?? What I want to do is set my "mtu" to "1492" becaue everytime i rebot it gets reset. Can you give me some more help. Thanks again


0

Response Number 5
Name: David Perry
Date: October 11, 2002 at 11:56:30 Pacific
Reply:

#!/bin/sh
ifconfig hme0 mtu 1492

name this file numerically higher than S69scriptname. Something like S99scriptname.

Alternatively, you can put the mtu 1492 after the plumb directive in line 309 of S69inet
Change line 309 to
/usr/sbin/ifconfig $1 plumb mtu 1492 2>&1 >/dev/null


0

Related Posts

See More



Response Number 6
Name: Jay- Fu
Date: October 11, 2002 at 12:38:06 Pacific
Reply:

David,

Thanks I got it to work. I really appreciate your help. THANKS!!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

How to reconfigure Video ... Motif Runtime Kit install...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: script in /etc/rc2.d

netscape stuck on %92 of 12k www.computing.net/answers/solaris/netscape-stuck-on-92-of-12k/500.html

Starting an application at bootup www.computing.net/answers/solaris/starting-an-application-at-bootup/2005.html

3C905c -TM driver cause systemcrash www.computing.net/answers/solaris/3c905c-tm-driver-cause-systemcrash/3182.html