tmpfiles: make b and c commands set ownership and permissions
The b and c commands in tmpfiles.sh were not setting ownership and permissions for the device nodes.
This commit is contained in:
parent
c18d623dc0
commit
19579687fd
@ -43,13 +43,17 @@ relabel() {
|
|||||||
_b() {
|
_b() {
|
||||||
# Create a block device node if it doesn't exist yet
|
# Create a block device node if it doesn't exist yet
|
||||||
local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
|
local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
|
||||||
[ ! -e "$path" ] && dryrun_or_real mknod $path b ${arg%:*} ${arg#*:}
|
[ ! -e "$path" ] && \
|
||||||
|
dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:} && \
|
||||||
|
dryrun_or_real chown $uid:$gid $path
|
||||||
}
|
}
|
||||||
|
|
||||||
_c() {
|
_c() {
|
||||||
# Create a character device node if it doesn't exist yet
|
# Create a character device node if it doesn't exist yet
|
||||||
local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
|
local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
|
||||||
[ ! -e "$path" ] && dryrun_or_real mknod $path c ${arg%:*} ${arg#*:}
|
[ ! -e "$path" ] && \
|
||||||
|
dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:} && \
|
||||||
|
dryrun_or_real chown $uid:$gid $path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user