LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2003, 07:36 AM   #1
Ricky
Member
 
Registered: Sep 2003
Posts: 34

Rep: Reputation: 15
Problem in starting at boot


Hello,
I have configured my l dhcpd and iptables,
my dhcpd is in /usr/sbin
and iptable routing script in /etc/rc.d/rc.ipmasq

Now to start these during the boot i put the following above line in /etc/rc.d/rc.local

But the problem is that they don't get started automatically at boot..
I have to run both of above manually after starting the computer.

Now can anybody tell me exactly , wht should i do to run dhcpd and iptable script at boot????
 
Old 10-02-2003, 09:02 AM   #2
Ricky
Member
 
Registered: Sep 2003
Posts: 34

Original Poster
Rep: Reputation: 15
Is this forum is dead!!
 
Old 10-03-2003, 09:09 AM   #3
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by Ricky
Is this forum is dead!!
Maybe before crying, you can think: Did I provide enough information ? Ahum anyway :-) What's the distro you're running?
 
Old 10-03-2003, 11:44 AM   #4
Ricky
Member
 
Registered: Sep 2003
Posts: 34

Original Poster
Rep: Reputation: 15
Red hat 7.2 with kernel 2.4.18

Last edited by Ricky; 10-04-2003 at 03:35 AM.
 
Old 10-03-2003, 04:57 PM   #5
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Can you display the content of rc.local ?

Make sure that the mentioned scripts are executable in /etc/init.d/
chmod 755 rc.ipmasq

and try

chkconfig --add dhcpd (long time ago)

Hope this helps,
 
Old 10-04-2003, 06:53 AM   #6
Ricky
Member
 
Registered: Sep 2003
Posts: 34

Original Poster
Rep: Reputation: 15
Thanx for that !!! I'll tell you if it works :::

Well, my /etc/rc.local is below::
Quote:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
#

# To enable framebuffer support in lilo.conf
vga=$(grep "vga" /etc/lilo.conf | wc -l)
if [ $vga -ge 1 ]; then
exit 1
else
cp /etc/lilo.conf /etc/tp-xpp-232003

cat > /etc/tp-asdf-232003 <<EOF
vga= 0x301
append= "console=/dev/tty2 CONSOLE=/dev/tty2"
EOF

cat /etc/tp-asdf-232003 /etc/tp-xpp-232003 > /etc/lilo.conf

lilo
lilo

rm -f /etc/tp-asdf-232003
rm -f /etc/tp-xpp-232003

fi

dma=$(grep "options ide-cd dma=1" /etc/modules.conf| wc -l)
if [ $dma -ge 1 ]; then
exit 1
else
cat >> /etc/modules.conf <<EOF
options ide-cd dma=1
EOF
fi

if [ -f /etc/elx-release ]; then
R=$(cat /etc/elx-release)

arch=$(uname -m)
a="a"
case "_$arch" in
_a*) a="an";;
_i*) a="an";;
esac

NUMPROC=`egrep -c "^cpu[0-9]+" /proc/stat`
if [ "$NUMPROC" -gt "1" ]; then
SMP="$NUMPROC-processor "
if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then
a="an"
else
a="a"
fi
fi

fi

touch /var/lock/subsys/local

#script for ip routing.
/etc/rc.d/rc.ipmasq

#to start dhcpd
/usr/sbin/dhcpd
What do u think??
 
Old 10-08-2003, 10:41 AM   #7
Ricky
Member
 
Registered: Sep 2003
Posts: 34

Original Poster
Rep: Reputation: 15
Well I think Now I have to Cry ... I am crying....
 
Old 10-08-2003, 10:56 AM   #8
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 622

Rep: Reputation: 30
Howzit

I hope I understood yout quetion r u trying to start the services automatically if yes then use the cmd setup u will find a option that says services activate the ones that u need. Another way is using the chkconfig --list this will list the services that are running and in what level. try this chkconfig --level 2345 iptables on, chkconfig --level 2345 dhcpd on, once again use chkconfig --list to check that they have been changed to on. U must reboot for this to take effect.

chow
 
Old 10-08-2003, 10:59 AM   #9
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by Ricky
Well I think Now I have to Cry ... I am crying....
Strange for an rc.local file, all that stuff inside....I don't know for sure if redhat 7 requires this stuff inside the rc.local....

Let's say when have you already tryed this options mentioned before and also have a look at linuxconf ? (controll panel) is there no way you can enable dhcp at at boot ?

Last edited by daveo; 10-08-2003 at 11:00 AM.
 
Old 10-09-2003, 09:17 AM   #10
Ricky
Member
 
Registered: Sep 2003
Posts: 34

Original Poster
Rep: Reputation: 15
Well ,,,,
How can i access cmd setup??

And when try to enable dhcpd through chkconfig I found the error that sevice not found??

Is that mean I have to edit rc.local?? if yes then wht should i put in that??
 
Old 10-09-2003, 09:26 AM   #11
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by Ricky
Well ,,,,
How can i access cmd setup??

And when try to enable dhcpd through chkconfig I found the error that sevice not found??

Is that mean I have to edit rc.local?? if yes then wht should i put in that??
Hmm and you are sure that the dhcpd exists ? ...
If yes, your rights might be the problem then ....
 
Old 10-09-2003, 10:21 AM   #12
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 622

Rep: Reputation: 30
Howzit

sorry I just relised what version of redhat u r running therefor there will be no setup cmd available thats found in RH8 + 9. The reason u canīt find the dhcpd service is because u r not running a dhcp server oops again. Therefor if u want to have dhcpd running u have to install the app. To view if it has been installed check with cmd rpm -q dhcp if no go then check under /root and view the install.log this will display all apps that have been installed on u'r box. once u have id if it has been installed or not then use the cmd chkconfig --list to see if that service appears if yes then follow the steps mentioned in the above posts to activate service

good luck
chow

 
Old 10-09-2003, 10:50 AM   #13
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by aqoliveira
Howzit

sorry I just relised what version of redhat u r running therefor there will be no setup cmd available thats found in RH8 + 9. The reason u canīt find the dhcpd service is because u r not running a dhcp server oops again. Therefor if u want to have dhcpd running u have to install the app. To view if it has been installed check with cmd rpm -q dhcp if no go then check under /root and view the install.log this will display all apps that have been installed on u'r box. once u have id if it has been installed or not then use the cmd chkconfig --list to see if that service appears if yes then follow the steps mentioned in the above posts to activate service

good luck
chow

And what appears in the processlist when an client has got an IP address from a dhcp server with a running IP address and gateway?

If I type:
twister / # dhcpcd --help
DHCP Client Daemon v.1.3.22-pl4
Copyright (C) 1996 - 1997 Yoichi Hariguchi <yoichi@fore.com>
Copyright (C) January, 1998 Sergei Viznyuk <sv@phystech.com>
Location: http://www.phystech.com/download/
Usage: dhcpcd [-dknrzBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]
[-i vendorClassID] [-I ClientID] [-c filename] [-s [ipaddr]]
[-w windowsize] [-L ConfigDir] [-G [gateway]] [interface]

What about that ? or am i getting lost here ?
 
Old 10-10-2003, 08:54 AM   #14
Ricky
Member
 
Registered: Sep 2003
Posts: 34

Original Poster
Rep: Reputation: 15
Well !!
I have installed my dhcpd from source(i.e. not by rpm)
And also i am able to start dhcpd manually.. and offcourse it is installed.
 
Old 10-10-2003, 10:04 AM   #15
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 622

Rep: Reputation: 30
Howzit

Now that I have understood what u have and how it installed it explains why the cmds I gave didn't work. Normally scripts for services r stored in /etc/rc.d/init.d/ u will find that u donīt have a startup script created. To check if itīs running use ps -aux or top.
If u able to see it then u have the service running fine and u may leave the entry in your /etc/rc.local. If u want may creat startup scripts for each run level would be better, at least u would be able to stop and restart services etc.

chow
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Starting WPA_Supplicant on boot? SmileZero Linux - Wireless Networking 5 10-01-2005 11:21 PM
Starting different services at boot mjjzf Slackware 2 05-21-2005 01:46 PM
Won't Boot - Starting Printer Service - Starting CUPS jeansond Linux - Newbie 0 10-11-2004 06:39 PM
starting a script on boot jax8 Linux - Newbie 1 03-19-2004 10:38 PM
Starting services at boot bionikxtc Solaris / OpenSolaris 1 03-12-2004 09:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration