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:
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/