From owner-freebsd-bugs@FreeBSD.ORG Sun Jul 2 20:00:35 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2D3216A407 for ; Sun, 2 Jul 2006 20:00:35 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16F1B446E0 for ; Sun, 2 Jul 2006 20:00:35 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k62K0Yx6007175 for ; Sun, 2 Jul 2006 20:00:34 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k62K0Y3L007174; Sun, 2 Jul 2006 20:00:34 GMT (envelope-from gnats) Resent-Date: Sun, 2 Jul 2006 20:00:34 GMT Resent-Message-Id: <200607022000.k62K0Y3L007174@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Florian Zavatzki Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 988AF16A40F for ; Sun, 2 Jul 2006 19:57:29 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C120446E1 for ; Sun, 2 Jul 2006 19:57:29 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k62JvSeW093321 for ; Sun, 2 Jul 2006 19:57:28 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k62JvSHr093300; Sun, 2 Jul 2006 19:57:28 GMT (envelope-from nobody) Message-Id: <200607021957.k62JvSHr093300@www.freebsd.org> Date: Sun, 2 Jul 2006 19:57:28 GMT From: Florian Zavatzki To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: conf/99721: [patch] /etc/rc.initdiskless problem copy dotfile in subdirectories to the MFS filesystem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2006 20:00:36 -0000 >Number: 99721 >Category: conf >Synopsis: [patch] /etc/rc.initdiskless problem copy dotfile in subdirectories to the MFS filesystem >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 02 20:00:34 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Florian Zavatzki >Release: FreeBSD 6.1-RC >Organization: >Environment: FreeBSD sol.blue-network.local 6.1-RC FreeBSD 6.1-RC #0: Thu Apr 13 20:17:20 CEST 2006 bc@sol.blue-network.local:/usr/obj/usr/src/sys/SOL-6-20060413 i386 >Description: There is a problem with dot files or directories when a subdirectory template is directly copied to the MFS filesystem. A file /conf/$ip/root/.foobar will not be copied, because the expression in line 303 cp -Rp $j/* /$subdir will only copy non dot files. >How-To-Repeat: Create a dot file in /conf/$ip/root (for example .foobar) and start a diskless client. There would be a MFS filesystem mounted on /root, but without .foobar. >Fix: Adding a simple cp -Rp $j/.* will result in a copy of the whole parent directory. So the easiest way would be to replace the copy with a tar command. --- /etc/rc.initdiskless Sun Jul 2 21:17:03 2006 +++ rc.initdiskless Sun Jul 2 21:43:32 2006 @@ -300,7 +300,7 @@ subdir=${j##*/} if [ -d $j -a ! -f $j.cpio.gz ]; then create_md $subdir - cp -Rp $j/* /$subdir + (cd $j; tar -cf - . | (cd /$subdir; tar -xpBf -)) fi done for j in /conf/$i/*.cpio.gz ; do >Release-Note: >Audit-Trail: >Unformatted: