|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Network & Security Any network and / or security related questions should be posted in here. |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
In a SuSe Linux 10.2 box, I use dhcrelay (DHCP relay agent).
dhcrelay should run all the time, so I put /etc/init.d/dhcrelay start in a shell script in /etc/init.d/boot.dhcrelay (and a soft link /etc/init.d/boot.d/S90boot.dhcrelay to that) After a reboot, dhcrelay is running in background as can be seen from a ps -ef command /usr/sbin/dhcrelay -i eth1 -i eth2 AAA.BBB.CCC.DDD (AAA... is IP of my DHCP server) except that ... DHCP requests ARE NOT RELAYED ... But if I manually do, at the root prompt # /etc/init.d/dhcrelay stop # /etc/init.d/dhcrelay start then DHCP requests are being relayed... Why does is not work when started from a script at boot time ?? |
|
|||
|
I can not determine from your information at what runlevel dhcrelay should run. IMHO it should run from runlevel 3 (network) upwards. When it is already started at a lower runlevel (e.g. immediately after boot) your network interface is not up. This might explain why it works later (when done manually).
This is only a guess. |
|
|||
|
As suggstion I may further add that links like S90... should not go into /etc/init.d but in one or more of the /etc/init.d/rc?.d directories.
More info is in /etc/init.d/README and in man insserv. Also note that YaST can be helpful here when you put a section like Code:
### BEGIN INIT INFO # Provides: dhcrelay # Required-Start: $local_fs $syslog $network # Required-Stop: $local_fs $syslog $network # X-UnitedLinux-Should-Start: dhcrelay # Default-Start:**3 5 # Default-Stop:** 0 1 2 6 # Description:****Start the DHCP relay agent ### END INIT INFO Gives you a lot to read
|
|
|||
|
It seems writing your own scripts to be started at boot in SuSE linux (10.2) is far
more strict and formalized than in other unices, where either you have a /etc/init.d/local script already where you can put things in or just make your own shell script and provide the necessary soft links in /etc/init.d/rc5.d ... Anyway, for this dhcrelay case, just setting the appropriate soft links in /etc/init.d/rc5.d should do the job (/etc/init.d/dhcrelay already exists) (putting them in rc3.d was not good for this system (not executed..) because the default run level (as specified in /etc/inittab) is 5 and not 3, scripts in rc3.d are ignored :-) ) If one does want to install a script enterily of one's own, is there any tutorial how to do this step by step ? Can't find that in the OpenSUSE reference manual .. Quote:
|
|
|||
|
Quote:
Yes, making your own scripts and the links will work, but in your original post you said you made a link in /etc/init.d/ which should be in /etc/init.d/rc5.d/ Quote:
The behaviour is different in different unices also. Some start things from a lower level when a higher level is to be reached (like stepping upwards through the levels adding more starts at every level). Some stop things not mentioned in a level and start only things mentioned in that level (e.g. HP-UX vs. Solaris). Quote:
The '### BEGIN INIT INFO' stuff is only there to tell YaST what to do so YaST can present a nice and easy interface to the GUI user. But you can do it all by hand as you say above. BUT it is not clear to me if, now you have the link in the correct place, everything works or not. |
|
|||
|
Everything works OK now..
In fact, how to do it is well described in the SuSE 10.2 PDF manual chapter "Booting and Configuring a Linux System". But that /etc/init.d/README file refered to a chapter entitled 'The SUSE boot concept' but there is no such chapter title in the 700 pp 10.2 PDF (-- there is even nowhere a string 'boot concept' !) :angry: .. which left me guessing for a while.. Anyway this trial and error learned me more how it organized in SuSe Linux. Enabling/disabling services can be done via the graphical Yast interface - it creates all the necessary soft-links for you at the right places.. Thanks for your hints.. Quote:
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|