From 274d6eee662c7f4fe0233da08247c9e40af5c382 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 11 Mar 2013 01:03:06 -0500 Subject: [PATCH] tmpfiles: add support for the new X line type tmpfiles now has a new line type, X, which is similar to the x line type used by the cleanup function. This is not supported yet by OpenRc, because we do not have the cleanup function in tmpfiles.sh, so I have added a dummy procedure for it so we don't get complaints about this line type. Reported-by: mgorny@gentoo.org X-Gentoo-Bug: 460880 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=460880 --- sh/tmpfiles.sh.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in index ca0cbc3b..f20cd0d3 100755 --- a/sh/tmpfiles.sh.in +++ b/sh/tmpfiles.sh.in @@ -126,6 +126,16 @@ _x() { # XXX: we don't implement this } +_X() { + # Ignore a path during cleanup. Use this type to prevent path + # removal as controled with the age parameter. Note that if path is + # a directory, the content of the directory is not excluded from + # clean-up, only the directory itself. + # Lines of this type accept shell-style globs in place of normal path names. + : + # XXX: we don't implement this +} + _r() { # Remove a file or directory if it exists. This may not be used to remove # non-empty directories, use R for that. Lines of this type accept shell-style @@ -263,7 +273,7 @@ for FILE in $tmpfiles_d ; do # whine about invalid entries case $cmd in - f|F|w|d|D|p|L|c|b|x|r|R|z|Z) ;; + f|F|w|d|D|p|L|c|b|x|X|r|R|z|Z) ;; \#) continue ;; *) warninvalid ; continue ;; esac