![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tables and borders | amatuer_lee_3 | Shell Programming and Scripting | 8 | 05-15-2008 01:57 PM |
| awk - list to tables | Lobaria | Shell Programming and Scripting | 10 | 04-24-2008 05:07 AM |
| Converting tables of row data into columns of tables | justthisguy | Shell Programming and Scripting | 7 | 07-16-2007 01:42 PM |
| viewing tables | itldp | UNIX for Dummies Questions & Answers | 2 | 12-17-2003 06:19 AM |
| PHP: list into tables | perleo | Shell Programming and Scripting | 2 | 10-01-2003 06:50 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
Yep, that did the trick.
I guess I'll put what I did in here just incase someone else needs it some other time. in /etc/rc3.d/ I created a file called S99addroute (why S99 it was with the naming convention with the other files soooo you can probably just make a file called addroute and it should work) -rwxr--r-- 1 root sys 244 Oct 6 09:31 S99addroute (make sure perms are same as other files) (inside file) #!/sbin/sh ifconfig hme0:1 plumb ifconfig hme0:1 172.28.66.10 netmask 255.255.255.252 broadcast 172.28.66.11 ifconfig hme0:1 up route add 10.192.0.0/10 172.28.66.9 I changed the ip's around so they aren't mine, but you get the idea... if anyone thinks the script can be improved or start it in a different rc dir let me know this is kinda new to me. |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Ok, two things.
First, Solaris goes into the rc directories upon startup and shutdown and runs the scripts in the rc directory. On startup, all scripts that begin with 'S' are run in order. Shutdown runs the scripts that begin with 'K'. So the script must start with an S or K depending on when you want the script to run. The numbers ensure the scripts are executed in the proper order. That the network is started before the web server or mail daemon for example. If you have a necessary route, I would think (I haven't tried this) that it would need to be run after the interface is set up and active. Second, it is convention and highly suggested that you put the addroute script in the /etc/init.d directory. Then use ln -s to link the S script in the rc2.d or rc3.d directories Code:
# ln -s ../init.d/addroute S99addroute Hope this helps. Carl |
|
#10
|
|||
|
|||
|
Oh and you shouldn't need to configure your interface in your script. It should already be up if there's a /etc/hostname.hme0 file. This file tells the startup scripts to initialize the hme0 interface with information in the other files (netmask, hosts, etc).
Carl |
|||
| Google The UNIX and Linux Forums |