From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B256D13832F for ; Mon, 25 Jul 2016 20:54:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4117CE085C; Mon, 25 Jul 2016 20:54:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CB9E6E08A1 for ; Mon, 25 Jul 2016 20:54:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E06E8340C54 for ; Mon, 25 Jul 2016 20:54:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1C95C7CE for ; Mon, 25 Jul 2016 20:54:47 +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: <1469479004.7d68839e9ea89b0a92aef69a9b4fd298554bb9b1.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: 7d68839e9ea89b0a92aef69a9b4fd298554bb9b1 X-VCS-Branch: master Date: Mon, 25 Jul 2016 20:54:47 +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: 138d40c0-4ab8-439e-ae05-a81f2905a879 X-Archives-Hash: 564ca224e84b34b1650fc5c1f01344d5 commit: 7d68839e9ea89b0a92aef69a9b4fd298554bb9b1 Author: Mike Gilbert gentoo org> AuthorDate: Sat Mar 12 18:01:51 2016 +0000 Commit: William Hubbs gentoo org> CommitDate: Mon Jul 25 20:36:44 2016 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=7d68839e tmpfiles: Make unrecognized options fatal This is part of #83. sh/tmpfiles.sh.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in index 43442d7..f711b1d 100644 --- a/sh/tmpfiles.sh.in +++ b/sh/tmpfiles.sh.in @@ -33,6 +33,11 @@ warninvalid() { error=$(( error+1 )) } >&2 +invalid_option() { + printf "tmpfiles: invalid option '%s'\n" "$1" >&2 + exit 1 +} + dryrun_or_real() { local dryrun= [ $DRYRUN -eq 1 ] && dryrun=echo @@ -299,6 +304,7 @@ while [ $# -gt 0 ]; do --dryrun|--dry-run) DRYRUN=1 ;; --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;; --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;; + -*) invalid_option "$1" ;; esac shift done