aboutsummaryrefslogtreecommitdiffstats
path: root/genfstab.in
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2018-08-28 19:52:15 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2018-08-28 19:52:15 -0400
commit781cf3aa0d3f9a93d84481833f5c83aa9ee68ac0 (patch)
tree52cb6aa536b1f89b370210678e6e1486ec4e08d0 /genfstab.in
parentd929c8cbc09732337fb4805accbf3564e9cca0bb (diff)
New upstream version 19upstream/19
Diffstat (limited to 'genfstab.in')
-rw-r--r--genfstab.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/genfstab.in b/genfstab.in
index 1e8a2c8..7663522 100644
--- a/genfstab.in
+++ b/genfstab.in
@@ -79,6 +79,7 @@ usage() {
usage: ${0##*/} [options] root
Options:
+ -f FILTER Restrict output to mountpoints matching the prefix FILTER
-L Use labels for source identifiers (shortcut for -t LABEL)
-p Exclude pseudofs mounts (default behavior)
-P Include pseudofs mounts
@@ -98,7 +99,7 @@ if [[ -z $1 || $1 = @(-h|--help) ]]; then
exit $(( $# ? 0 : 1 ))
fi
-while getopts ':LPpt:U' flag; do
+while getopts ':f:LPpt:U' flag; do
case $flag in
L)
bytag=LABEL
@@ -106,6 +107,9 @@ while getopts ':LPpt:U' flag; do
U)
bytag=UUID
;;
+ f)
+ prefixfilter=$OPTARG
+ ;;
P)
pseudofs=1
;;
@@ -139,6 +143,8 @@ findmnt -Recvruno SOURCE,TARGET,FSTYPE,OPTIONS,FSROOT "$root" |
continue
fi
+ [[ $target = "$prefixfilter"* ]] || continue
+
# default 5th and 6th columns
dump=0 pass=2