LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 08-12-2007, 11:10 PM   #1
spaceageliving
Member
 
Registered: Aug 2007
Distribution: CentOS
Posts: 48

Rep: Reputation: 16
compiling Bind 9.4.1 on FC6--no startup script?


I just compiled and installed Bind 9.4.1 on FC6 and there is no startup script in init.d. The previous version of Bind I had installed via Yum had a fairly complex rc script, but I uninstalled that version before going for this install. Is there a way to get a "recommended" startup script for Fedora for this version of Bind? Seems like it should be a no-brainer for the install to provide this...but I guess not.
 
Old 08-13-2007, 01:22 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,372
Blog Entries: 54

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
Extract the initscript from the closest version RPM and adapt that?
 
Old 08-13-2007, 09:45 AM   #3
spaceageliving
Member
 
Registered: Aug 2007
Distribution: CentOS
Posts: 48

Original Poster
Rep: Reputation: 16
thanks...yes, that was my next thought. I'll give it a shot...I was hoping to find a configure switch like --build=redhat or something which would offer a script, but I couldn't find anything.
 
Old 08-13-2007, 10:20 AM   #4
spaceageliving
Member
 
Registered: Aug 2007
Distribution: CentOS
Posts: 48

Original Poster
Rep: Reputation: 16
I found this script and made some minor mods to it...it seems to be working ok (note also that the bind install doesn't setup a pid file/directory in /var/run, so you need to do that also):

Code:
#!/bin/sh
#
# named This shell script takes care of starting and stopping
# named (BIND DNS server).
#
# chkconfig: 345 55 45
# description: named (BIND) is a Domain Name Server (DNS) \
# that is used to resolve host names to IP addresses.
# probe: true
#
# 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/local/sbin/named ] || exit 0
[ -f /etc/named/named.conf ] || exit 0
#
# See how we were called.
case "$1" in
        start)
                # Start daemons.
                echo -n "Starting named: "
                daemon /usr/local/sbin/named -u named -c /etc/named/named.conf
                echo
                touch /var/lock/subsys/named
                ;;

        stop)
                # Stop daemons.
                echo -n "Shutting down named: "
                kill `pidof named`
                echo
                rm -f /var/lock/subsys/named
                ;;

        status)
                status named
                exit $?
                ;;

        restart)
                $0 stop
                $0 start
                exit $?
                ;;

        reload)
                /usr/local/sbin/rndc reload
                exit $?
                ;;

        probe)
                # named knows how to reload intelligently; we don't want linuxconf
                # to offer to restart every time
                /usr/local/sbin/rndc reload >/dev/null 2>&1 || echo start
                exit 0
                ;;
        #

        *)
                echo "Usage: named {start|stop|status|restart|reload}"
                exit 1
esac
#
exit 0

Last edited by unSpawn; 08-14-2007 at 12:20 PM. Reason: //moderator adds BB "code" tags for readability
 
Old 11-14-2007, 01:30 AM   #5
manitabh
LQ Newbie
 
Registered: Nov 2007
Location: Bangalore, India
Posts: 16

Rep: Reputation: 0
rc.d help

I am trying to configure /etc/rc.d/init.d/named..
I have written the script and made a file /var/run/named/named.pid.
After that I have created a user named and set permission like "chown named.named /var/run/named/".
Then I run chkconfig --add named
Now when I restart the system I don't find /var/run/named/named.pid file.
Again when I try to start named by /etc/rc.d/init.d/named start it gives me failed message. My rndc is conigured properly.
 
  


Reply

Tags
bind, fedora


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
DNS - Bind 9 on SUSE 9 loses zone records on startup dula Linux - Server 1 12-03-2006 10:15 PM
fc6 startup problem padeco Linux - Hardware 1 11-28-2006 10:21 AM
mount --bind olddir newdir --> anyway to do this at startup ? darkknight_9 Linux - Newbie 4 04-21-2005 05:35 PM
why won't rc.bind start on startup? gsgleason Slackware 1 10-24-2004 12:30 PM
How to add BIND DNS server to startup in Red Hat? BxBoy Linux - Networking 4 03-01-2004 12:33 PM


All times are GMT -5. The time now is 03:54 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration