latenitetech
Regular Contributor
I'm thinking this should be a trivial problem, but I've not stumbled on the solution yet. I'm wanting to add an auto-fsck for my flash drives in the pre-mount script (AsusWRT-Merlin 380.64, RT-AC68U). It's easy when all the volumes use the same file system type, but I have a mix of EXT2 and FAT32, so I need to be able to determine either the partition label or the file system type from the /dev/sdx# that's passed in as the first argument, so I call the proper fsck program. The mount order is pretty random, so I can't go by just the device name as it's always different.
I think all I need is a simple utility (or command sequence) that given the device string, returns either the file system type or the partition label. I can take it from there.
Any ideas?
Thx
-Mark
I think all I need is a simple utility (or command sequence) that given the device string, returns either the file system type or the partition label. I can take it from there.
Any ideas?
Thx
-Mark