diff options
| author | 2021-08-11 18:42:40 -0400 | |
|---|---|---|
| committer | 2021-08-11 18:42:40 -0400 | |
| commit | a895e76831f95063674a03cd13d153bcc94212b6 (patch) | |
| tree | 7cceb6c15abe2ecbed01453e43cfe78d475d5d79 /genfstab.in | |
| parent | e60738a060ea0bb6e532b69add05db7b697462af (diff) | |
| parent | f922fa446f9893e571bf038c5e2d2520837c9814 (diff) | |
Update upstream source from tag 'upstream/24'
Update to upstream version '24'
with Debian dir 593973476c4a6f4d1408593dbeaa4a01ea8129a2
Diffstat (limited to 'genfstab.in')
| -rw-r--r-- | genfstab.in | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/genfstab.in b/genfstab.in index c626290..6a2ad10 100644 --- a/genfstab.in +++ b/genfstab.in @@ -163,23 +163,19 @@ findmnt -Recvruno SOURCE,TARGET,FSTYPE,OPTIONS,FSROOT "$root" | pass=0 fi - if [[ $fsroot != / ]]; then - if [[ $fstype = btrfs ]]; then - opts+=,subvol=${fsroot#/} - else - # it's a bind mount - src=$(findmnt -funcevo TARGET "$src")$fsroot - if [[ $src -ef $target ]]; then - # hrmm, this is weird. we're probably looking at a file or directory - # that was bound into a chroot from the host machine. Ignore it, - # because this won't actually be a valid mount. Worst case, the user - # just re-adds it. - continue - fi - fstype=none - opts+=,bind - pass=0 + if [[ $fsroot != / && $fstype != btrfs ]]; then + # it's a bind mount + src=$(findmnt -funcevo TARGET "$src")$fsroot + if [[ $src -ef $target ]]; then + # hrmm, this is weird. we're probably looking at a file or directory + # that was bound into a chroot from the host machine. Ignore it, + # because this won't actually be a valid mount. Worst case, the user + # just re-adds it. + continue fi + fstype=none + opts+=,bind + pass=0 fi # filesystem quirks |
