Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src PR/49380: KAMADA Ken'ichi: ntpd_chrootdir does not work on N...



details:   https://anonhg.NetBSD.org/src/rev/61d5e7a7589f
branches:  trunk
changeset: 811946:61d5e7a7589f
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Nov 23 19:56:47 2015 +0000

description:
PR/49380: KAMADA Ken'ichi: ntpd_chrootdir does not work on NetBSD 7.0_BETA
Provide /etc/resolv.conf so that it can resolve names. This is needed because
of deferred name resolution.
XXX: pullup -7

diffstat:

 distrib/sets/lists/base/mi |  3 ++-
 etc/mtree/NetBSD.dist.base |  3 ++-
 etc/mtree/special          |  3 ++-
 etc/rc.d/ntpd              |  9 ++++++++-
 4 files changed, 14 insertions(+), 4 deletions(-)

diffs (76 lines):

diff -r 6c2227fd3b9e -r 61d5e7a7589f distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi        Mon Nov 23 08:00:45 2015 +0000
+++ b/distrib/sets/lists/base/mi        Mon Nov 23 19:56:47 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1117 2015/11/11 07:48:41 ozaki-r Exp $
+# $NetBSD: mi,v 1.1118 2015/11/23 19:56:47 christos Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -5877,6 +5877,7 @@
 ./var/chroot/named/var/tmp                     base-bind-root
 ./var/chroot/ntpd                              base-ntp-root
 ./var/chroot/ntpd/dev                          base-ntp-root
+./var/chroot/ntpd/etc                          base-ntp-root
 ./var/chroot/ntpd/var                          base-ntp-root
 ./var/chroot/ntpd/var/db                       base-ntp-root
 ./var/chroot/ntpd/var/run                      base-ntp-root
diff -r 6c2227fd3b9e -r 61d5e7a7589f etc/mtree/NetBSD.dist.base
--- a/etc/mtree/NetBSD.dist.base        Mon Nov 23 08:00:45 2015 +0000
+++ b/etc/mtree/NetBSD.dist.base        Mon Nov 23 19:56:47 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: NetBSD.dist.base,v 1.149 2015/09/03 22:24:02 youri Exp $
+#      $NetBSD: NetBSD.dist.base,v 1.150 2015/11/23 19:56:47 christos Exp $
 #      @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -1268,6 +1268,7 @@
 ./var/chroot/named/var/tmp     mode=01775 gname=named
 ./var/chroot/ntpd
 ./var/chroot/ntpd/dev
+./var/chroot/ntpd/etc
 ./var/chroot/ntpd/var
 ./var/chroot/ntpd/var/db       mode=0775 gname=ntpd
 ./var/chroot/ntpd/var/run      mode=0775 gname=ntpd
diff -r 6c2227fd3b9e -r 61d5e7a7589f etc/mtree/special
--- a/etc/mtree/special Mon Nov 23 08:00:45 2015 +0000
+++ b/etc/mtree/special Mon Nov 23 19:56:47 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: special,v 1.152 2015/03/21 19:10:43 jmcneill Exp $
+#      $NetBSD: special,v 1.153 2015/11/23 19:56:47 christos Exp $
 #      @(#)special     8.2 (Berkeley) 1/23/94
 #
 # This file may be overwritten on upgrades.
@@ -400,6 +400,7 @@
 ./var/chroot/named/var/tmp     type=dir  mode=01775 gname=named
 ./var/chroot/ntpd              type=dir  mode=0755
 ./var/chroot/ntpd/dev          type=dir  mode=0755
+./var/chroot/ntpd/etc          type=dir  mode=0755
 ./var/chroot/ntpd/var          type=dir  mode=0755
 ./var/chroot/ntpd/var/db       type=dir  mode=0775 gname=ntpd
 ./var/chroot/ntpd/var/run      type=dir  mode=0775 gname=ntpd
diff -r 6c2227fd3b9e -r 61d5e7a7589f etc/rc.d/ntpd
--- a/etc/rc.d/ntpd     Mon Nov 23 08:00:45 2015 +0000
+++ b/etc/rc.d/ntpd     Mon Nov 23 19:56:47 2015 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ntpd,v 1.15 2014/12/25 23:00:18 spz Exp $
+# $NetBSD: ntpd,v 1.16 2015/11/23 19:56:47 christos Exp $
 #
 
 # PROVIDE: ntpd
@@ -53,6 +53,13 @@
        if [ ! -d "${ntpd_chrootdir}/etc" ]; then
                mkdir "${ntpd_chrootdir}/etc"
        fi
+
+       for f in resolv.conf; do
+               if ! cmp -s "/etc/$f" "${ntpd_chrootdir}/etc/$f"; then
+                       cp -p "/etc/$f" "${ntpd_chrootdir}/etc/$f"
+               fi
+       done
+
        if [ ! -f "${ntpd_chrootdir}/etc/services" ]; then
                getent services ntp/udp ntp/tcp \
                        > "${ntpd_chrootdir}/etc/services"



Home | Main Index | Thread Index | Old Index