Skip to main content
Topic: New Init sscript for named (Read 1086 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

New Init sscript for named

I created a new init.d script for named but it has left me with a couple of open questions.

I rsynced my named files from my server include /etc/named.conf

I then copied the ssh init file to name and edited it, but found a number of problems and question:
I globally changed all the 'ssh' to 'name' and 'SSH' to 'NAME'
My set up is as follows

/etc/named.conf is hard linked to /etc/name/named.config
in following the settings in the init.d file

I added it with rc.update named add

and it failed to work.  I think that named creates its own pid run file, so I have to remove the pid option in the start-stop-daemon commands

Then there was this line in checkconfig that I didn't understand but it was starting the server causing the script to fail, saying it was already started (which was correct)
The mystery line is as follows:



Code: [Select]
  ssh-keygen -A || return 1

        [ "${NAMED_PIDFILE}" != "/run/named.pid" ] \
                && NAMED_OPTS="${NAMED_OPTS} -o PidFile=${NAMED_PIDFILE}"
        [ "${SSHD_CONFIG}" != "/etc/ssh/sshd_config" ] \
                && NAMED_OPTS="${NAMED_OPTS} -f ${NAMED_CONFIG}"

        "${NAMED_BINARY}" -t ${NAME_OPTS} || return 1

I'm not sure what this does.

Also, as I read the openrc docs, shouldn't there be a config file under
/etc/conf.d/