diff options
author | Mike Gilbert <floppym@gentoo.org> | 2015-06-13 21:25:33 -0400 |
---|---|---|
committer | Doug Freed <dwfreed@mtu.edu> | 2015-06-24 22:40:35 -0700 |
commit | a36a635b016a7427dd1739a26c951fedf22f0dec (patch) | |
tree | 1c6316cb25ce4724ce82bfa68e9cc0413bfac651 /sh | |
parent | 9310ccc06bcadd8897aed51cd51c94fccb7d9c07 (diff) |
tmpfiles: Recognize type 'v' (create btrfs subvol)
This change does NOT implement btrfs subvol creation. Instead, it
treats 'v' the same as 'd', which is an acceptable fallback
according to the manual.
Fixes #58
Diffstat (limited to 'sh')
-rw-r--r-- | sh/tmpfiles.sh.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in index 046bf9f1..89bd03e8 100644 --- a/sh/tmpfiles.sh.in +++ b/sh/tmpfiles.sh.in @@ -141,6 +141,13 @@ _D() { fi } +_v() { + # Create a subvolume if the path does not exist yet and the file system + # supports this (btrfs). Otherwise create a normal directory. + # TODO: Implement btrfs subvol creation. + _d "$@" +} + _L() { # Create a symlink if it doesn't exist yet local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6 @@ -336,7 +343,7 @@ for FILE in $tmpfiles_d ; do # whine about invalid entries case $cmd in - f|F|w|d|D|p|L|c|C|b|x|X|r|R|z|Z) ;; + f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z) ;; *) warninvalid ; continue ;; esac @@ -344,7 +351,7 @@ for FILE in $tmpfiles_d ; do if [ "$mode" = '-' -o "$mode" = '' ]; then case "$cmd" in p|f|F) mode=0644 ;; - d|D) mode=0755 ;; + d|D|v) mode=0755 ;; C|z|Z|x|r|R|L) ;; esac fi |