Module Name: src Committed By: msaitoh Date: Wed Jan 7 18:18:45 UTC 2015
Modified Files: src/etc/rc.d [netbsd-5]: ntpd Log Message: Pull up following revision(s) (requested by he in ticket #1940): etc/rc.d/ntpd: revision 1.15 new ntpd wants to be able to translate ntp into a port number after chr= oot, so give it its own small copy of /etc/services in the chroot To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.13.34.1 src/etc/rc.d/ntpd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/etc/rc.d/ntpd diff -u src/etc/rc.d/ntpd:1.13 src/etc/rc.d/ntpd:1.13.34.1 --- src/etc/rc.d/ntpd:1.13 Fri Aug 13 18:08:03 2004 +++ src/etc/rc.d/ntpd Wed Jan 7 18:18:45 2015 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: ntpd,v 1.13 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: ntpd,v 1.13.34.1 2015/01/07 18:18:45 msaitoh Exp $ # # PROVIDE: ntpd @@ -49,6 +49,21 @@ ntpd_precmd() fi ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift + if [ ! -d "${ntpd_chrootdir}/etc" ]; then + mkdir "${ntpd_chrootdir}/etc" + fi + if [ ! -f "${ntpd_chrootdir}/etc/services" ]; then + getent services ntp/udp ntp/tcp \ + > "${ntpd_chrootdir}/etc/services" + fi + if [ ! -d "${ntpd_chrootdir}/var/db" ]; then + mkdir -p "${ntpd_chrootdir}/var/db" + fi + if [ ! -f "${ntpd_chrootdir}/var/db/services.cdb" ]; then + services_mkdb -o "${ntpd_chrootdir}/var/db/services.cdb" \ + "${ntpd_chrootdir}/etc/services" + fi + # Change run_rc_commands()'s internal copy of $ntpd_flags # rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"