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
This commit is contained in:
William Hubbs 2013-03-11 01:03:06 -05:00
parent f1ae8963c9
commit 274d6eee66

View File

@ -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