diff options
author | Mike Gilbert <floppym@gentoo.org> | 2016-03-12 13:01:51 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2016-07-25 15:36:44 -0500 |
commit | 7d68839e9ea89b0a92aef69a9b4fd298554bb9b1 (patch) | |
tree | 9479ec18eda82b34536ccfb4c71511d5d5d532b2 /sh | |
parent | 5341a925c15934674031aebb97533b0adcd10236 (diff) |
tmpfiles: Make unrecognized options fatal
This is part of #83.
Diffstat (limited to 'sh')
-rw-r--r-- | sh/tmpfiles.sh.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in index 43442d79..f711b1da 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 |