From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 31 11:40:30 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 670C016A4DE for ; Thu, 31 Aug 2006 11:40:30 +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 8734A43D5A for ; Thu, 31 Aug 2006 11:40:28 +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 k7VBeSBq032289 for ; Thu, 31 Aug 2006 11:40:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7VBeSvl032284; Thu, 31 Aug 2006 11:40:28 GMT (envelope-from gnats) Resent-Date: Thu, 31 Aug 2006 11:40:28 GMT Resent-Message-Id: <200608311140.k7VBeSvl032284@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, Attila Nagy Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F7FE16A4E5 for ; Thu, 31 Aug 2006 11:33:02 +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 4B84A43D5F for ; Thu, 31 Aug 2006 11:32:57 +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 k7VBWqsQ041007 for ; Thu, 31 Aug 2006 11:32:52 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k7VBWpb7041006; Thu, 31 Aug 2006 11:32:51 GMT (envelope-from nobody) Message-Id: <200608311132.k7VBWpb7041006@www.freebsd.org> Date: Thu, 31 Aug 2006 11:32:51 GMT From: Attila Nagy To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: misc/102724: rc.initdiskless does not copy hidden files 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: Thu, 31 Aug 2006 11:40:30 -0000 >Number: 102724 >Category: misc >Synopsis: rc.initdiskless does not copy hidden files >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Aug 31 11:40:27 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Attila Nagy >Release: FreeBSD 6-STABLE >Organization: FSN >Environment: 6.1-STABLE #5: Tue Aug 29 16:06:59 CEST 2006 >Description: In rc.initdiskless there is a loop, which iterates through the template directories and copies its content to the destination. The command is cp -Rp $j/* /$subdir which obviously have problems with file names starting with a dot and maybe with other cases as well. >How-To-Repeat: >Fix: Leaving the * from the end, cp will copy all files, and due to -R, a source with an ending / means the contents of the directory will be copied, instead of the directory itself. --- /etc/rc.initdiskless Tue Aug 29 15:14:44 2006 +++ rc.initdiskless Thu Aug 31 13:06:53 2006 @@ -300,7 +300,7 @@ subdir=${j##*/} if [ -d $j -a ! -f $j.cpio.gz ]; then create_md $subdir - cp -Rp $j/* /$subdir + cp -Rp $j/ /$subdir fi done for j in /conf/$i/*.cpio.gz ; do >Release-Note: >Audit-Trail: >Unformatted: