On Sat, Jul 28, 2018 at 08:47:49AM -0700, Eric Sandeen wrote: > > > On 7/28/18 12:44 AM, Darrick J. Wong wrote: > >> Actually... this sort of fstqab poses a problem for your function and mine: > >> > >> #/dev/mapper/vg-lv_root / xfs defaults 1 1 > >> /dev/mapper/vg-lv_root / ext4 defaults 1 1 > >> > >> because it'll happily pick xfs. Need to exclude comment lines, so exclude > >> MNT_FSNAME starting with # - > >> > >> test ${MNT_FSNAME::1} == "#" && continue > >> > >> or in my fancy world could do: > >> > >> awk '(!/^#/) && ($2 == "/") {print $3}' $(fstab_files) > >> > >> tho I guess mine assumes only one matching line... | head -n 1 ;) > > Might have to add awk as a Depends: dependency in debian/control if you > > do that. I think it's cleaner.... > > > > Ok, up to you. If this is all just boilerplate from other debian > scripts and it's good enough for them I guess I can just merge as > is. The only thing that seemed to matter was not ignoring comment lines, > which would be trivial to fix. Ok, I'll do that. --D > -Eric > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html