pid1: add GracefulOptions= setting to .mount units
This new setting can be used to specify mount options that shall only be added to the mount option string if the kernel supports them. This shall be used for adding "usrquota" to tmp.mount without breaking compat, but is generally be useful.
This commit is contained in:
@@ -185,3 +185,10 @@ systemctl status "$WORK_DIR/mnt"
|
||||
touch "$WORK_DIR/mnt/hello"
|
||||
[[ "$(stat -c "%U:%G" "$WORK_DIR/mnt/hello")" == "testuser:testuser" ]]
|
||||
systemd-umount LABEL=owner-vfat
|
||||
|
||||
# Mkae sure that graceful mount options work
|
||||
GRACEFULTEST="/tmp/graceful/$RANDOM"
|
||||
systemd-mount --tmpfs -p GracefulOptions=idefinitelydontexist,nr_inodes=4711,idonexisteither "$GRACEFULTEST"
|
||||
findmnt -n -o options "$GRACEFULTEST"
|
||||
findmnt -n -o options "$GRACEFULTEST" | grep -q nr_inodes=4711
|
||||
umount "$GRACEFULTEST"
|
||||
|
||||
Reference in New Issue
Block a user