According to Sony Lloyd Ponton: While burning my CPU.
> 
> Hi,
> I ve configured my named config files (named.boot, named.ca, named.conf
> cause I have Bind 8.1..named.rev..named..), and I ve read that I should
> find in my rc script files an rc file that looks like : if [ -f
> /etc/inet/named.boot -a -x /usr/sbin/in.named] then /usr/sbin/in.named fi..
> Well, I was searching through all my rc scripts files and still cannot find
> the right one, where I should include the precedent scripts. In my rc.d
> directory, I just see init.d, rc, rc.local, rc.sysinit, rc0.d, rc1.d..etc..
> In all these directories and files I found scripts that looks like the
> following one that I took from /etc/rc.d/init.d/named.init:
> #source network configs
> ./etc/sysconfig/network
> #check that networking is up:
> [$ {NETWORKING}="no"] && exit 0
>  [ if /usr/sbin/httpd] :: exit 0
> #
> [if /etc/named.boot] :: exit 0
> # start daemons 
> echo -n "starting named:"
> daemon named
> echo 
> touch /var/lock/subsys/named
> ;;
> #stop daemons 
> echo -n " shutting down named"
> killproc named..
> 
> Well, I m on redhat 4.2. Ok, I know some paths should be changed, for
> ie..where there s named.boot, I ll replace it by named.conf and it s right
> path cause this is Bind 8.1. But that s not the problem cause whatever I ve
> tried (before installin Bind8.1, or after..the problem still the same),
> here s the problem: 
> First what would be the rc file that I should put in the scripts to start
> up my named daemon (rc.0? httpd.init??named.init??).
> Second, whenever I go to /usr/sbin and run httpd,I got error: cannot
> determine Local host name . Use servername to set it. What is that??what
> Should I do??
> Third: When I run named from /usr/sbin, I got no error and back to prompt
> ..but when I execute ps to look at the processes that are active..there s
> no entry for named. So I still cannot run named.
> 

With Redhat-4.2 you need to start by having a symbolic-link in
/etc/rc.d/rc3.d/S55named.init pointing to /etc/rc.d/init.d/named.init

To make the link do;

cd /etc/rc.d/rc3.d
ln -s /etc/rc.d/init.d/named.init S55named.init

It would seem you have cut out some of the named.init file or it is corrupt,
named.init should look like;

#!/bin/sh
#
# lpd           This shell script takes care of starting and stopping
#               lpd (printer daemon).
#

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/sbin/named ] || exit 0

[ -f /etc/named.boot ] || exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting named: "
        daemon named
        echo
        touch /var/lock/subsys/named
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down named: "
        killproc named
        echo "done"
        rm -f /var/lock/subsys/named
        ;;
  *)
        echo "Usage: named {start|stop}"
        exit 1
esac

exit 0

On the command line to test your script you can do;
'/etc/rc.d/init.d/named.init start'
or if you are in ../init.d
'./named.init start'
you should then get a return of;

Starting named: named   and the get your prompt back.

The symlink mentioned above will start named at boottime.

There was a mail from some "knowing one" who explaned just how the boot
sequence works via symlinks with an exacht account of what each command
does, that mail could be found on;

http://www.findmail.com/listsaver/linux-newbie/info.html 

The only problem with the archive is that it has no "Search Engine" making
it hard to find just the mail your looking for, maybe someone could express
the need for such an option in that archive to its maintainer.??

Your httpd problem is possably caused by your machine not having a valid
'hostname' if so you will need to edit /etc/httpd/conf/httpd.conf and enter
a "valid" ServerName,  Read the comments above that line first, its very
important, and tells you what to do if you are unsure.


> Thanks for Help

Hope this helps.

> 
> Arhel Lehenz
> Norway
> 


-- 
Regards Richard.
[EMAIL PROTECTED]

Reply via email to