From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EE3371381F3 for ; Sat, 27 Jul 2013 16:12:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B0ADE09DA; Sat, 27 Jul 2013 16:12:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 05529E09DA for ; Sat, 27 Jul 2013 16:12:28 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E4CA533E906 for ; Sat, 27 Jul 2013 16:12:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7B9B6E468F for ; Sat, 27 Jul 2013 16:12:26 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1374940412.e90dcf39dd3f3658a7d9804e73d0442ae6c7935c.WilliamH@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/tmpfiles.sh.in X-VCS-Directories: sh/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: e90dcf39dd3f3658a7d9804e73d0442ae6c7935c X-VCS-Branch: master Date: Sat, 27 Jul 2013 16:12:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f0f6fed6-0e55-41f9-9c4b-6cfb5fd21d02 X-Archives-Hash: 1655dee52803a1aa260b598c3eef8287 commit: e90dcf39dd3f3658a7d9804e73d0442ae6c7935c Author: Dirk Sondermann dyximaq de> AuthorDate: Sat Jul 27 15:53:32 2013 +0000 Commit: William Hubbs gentoo org> CommitDate: Sat Jul 27 15:53:32 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=e90dcf39 tmpfiles: do not signal an error if device nodes already exist X-Gentoo-Bug: 478336 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478336 --- sh/tmpfiles.sh.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in index 22d5f1f..b59f4cb 100755 --- a/sh/tmpfiles.sh.in +++ b/sh/tmpfiles.sh.in @@ -54,17 +54,19 @@ relabel() { _b() { # Create a block device node if it doesn't exist yet local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6 - [ ! -e "$path" ] && \ - dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:} && \ + if [ ! -e "$path" ]; then + dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:} dryrun_or_real chown $uid:$gid $path + fi } _c() { # Create a character device node if it doesn't exist yet local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6 - [ ! -e "$path" ] && \ - dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:} && \ + if [ ! -e "$path" ]; then + dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:} dryrun_or_real chown $uid:$gid $path + fi }