From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:master commit in: init.d/, sh/
Date: Thu, 3 Apr 2014 18:05:16 +0000 (UTC) [thread overview]
Message-ID: <1395934601.686ee62a79e12ad73581ef4e151baad21b624935.williamh@OpenRC> (raw)
commit: 686ee62a79e12ad73581ef4e151baad21b624935
Author: Andrew Gregory <andrew.gregory.8 <AT> gmail <DOT> com>
AuthorDate: Wed Mar 26 16:13:20 2014 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Mar 27 15:36:41 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=686ee62a
tmpfiles: add support for --boot option
For compatibility with systemd-tmpfiles.
Fixes #17
Signed-off-by: Andrew Gregory <andrew.gregory.8 <AT> gmail.com>
---
init.d/tmpfiles.setup.in | 2 +-
sh/tmpfiles.sh.in | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/init.d/tmpfiles.setup.in b/init.d/tmpfiles.setup.in
index 7edef5a..d5a6ecd 100644
--- a/init.d/tmpfiles.setup.in
+++ b/init.d/tmpfiles.setup.in
@@ -12,7 +12,7 @@ depend()
start()
{
ebegin "setting up tmpfiles.d entries"
- @LIBEXECDIR@/sh/tmpfiles.sh --exclude-prefix=/dev --create --remove \
+ @LIBEXECDIR@/sh/tmpfiles.sh --exclude-prefix=/dev --create --remove --boot \
${tmpfiles_opts}
eend $?
return 0
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index da588e2..a903163 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -214,7 +214,7 @@ _Z() {
CHOPTS=-R relabel "$@"
}
-CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
+BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
EXCLUDE=
PREFIX=
FILE=
@@ -249,6 +249,7 @@ done
while [ $# -gt 0 ]; do
case $1 in
+ --boot) BOOT=1 ;;
--create) CREATE=1 ;;
--remove) REMOVE=1 ;;
--clean) CLEAN=1 ;; # TODO: Not implemented
@@ -266,7 +267,7 @@ if [ $(( CLEAN )) -eq 1 ] ; then
fi
if [ "$CREATE$REMOVE" = '00' ]; then
- printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
+ printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
exit 1
fi
@@ -283,6 +284,7 @@ for FILE in $tmpfiles_d ; do
# Cmd Path Mode UID GID Age Argument
# d /run/user 0755 root root 10d -
# Mode, UID, GID, Age, Argument may be omitted!
+ # If Cmd ends with !, the line is only processed if --boot is passed
# XXX: Upstream says whitespace is NOT permitted in the Path argument.
# But IS allowed when globs are expanded for the x/r/R/z/Z types.
@@ -294,6 +296,10 @@ for FILE in $tmpfiles_d ; do
continue
fi
+ case $cmd in
+ *!) [ "$BOOT" -eq "1" ] || continue; cmd=${cmd%!} ;;
+ esac
+
# whine about invalid entries
case $cmd in
f|F|w|d|D|p|L|c|b|x|X|r|R|z|Z) ;;
next reply other threads:[~2014-04-03 18:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 18:05 William Hubbs [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-02-17 2:49 [gentoo-commits] proj/openrc:master commit in: init.d/, sh/ William Hubbs
2012-02-20 23:11 William Hubbs
2012-01-28 18:32 Christian Ruppert
2012-01-22 18:00 William Hubbs
2011-12-20 4:01 William Hubbs
2011-11-19 0:05 William Hubbs
2011-10-16 23:02 Mike Frysinger
2011-07-05 23:42 William Hubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395934601.686ee62a79e12ad73581ef4e151baad21b624935.williamh@OpenRC \
--to=williamh@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox