LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   named default configuration file (https://www.linuxquestions.org/questions/linux-networking-3/named-default-configuration-file-40181/)

computerguy121 01-03-2003 07:31 AM

named default configuration file
 
Hi,

I am having problems with named, i find if i start it in the configuration directory (/etc/) it works fine however if i chose any other directory it claims it's started when it has'nt.

The command for stopping works, only if started from /etc/ directory, suggesting the '/etc/rc.d/init.d/named start' only claims to start the process
Quote:

[root@linux etc]# /etc/rc.d/init.d/named stop
Stopping named: [ OK ]

This command claims its started when it has'nt
Quote:

[root@linux etc]# /etc/rc.d/init.d/named start
Starting named: [ OK ]
However if its started using the following it works fine every-time

Quote:

[root@linux etc]# pwd
/etc
[root@linux etc]# named

Is there any way i can get this command to work :Pengy:, so it starts on boot-up

/etc/rc.d/init.d/named start

Any ideas appreciated. -:newbie:- :)

niknah 01-03-2003 07:56 AM

when you've cd to /etc you're actually running the named in /usr/sbin

try editing the /etc/rc.d/init.d/named file and getting rid of any junk on the line that starts "named", sometimes they put in arguments after "named" that don't work or they prefix it with "daemon".


computerguy121 01-03-2003 08:09 AM

Thanks that was so helpful did not relise /etc/rc.d/init.d/named was a file :)

Quote:


start() {
# Start daemons.
gprintf "Starting %s: " $prog
if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then
OPTIONS="${OPTIONS} -t ${ROOTDIR}"
fi

daemon named -c /etc/named.conf

# Line changed 03/01/02 - no longer lies about starting
#daemon named -u named ${OPTIONS}


RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/named
echo
return $RETVAL
}
I have changed the startup as listed above and it works perfect thanks!!!!!!!!!


All times are GMT -5. The time now is 08:20 PM.