initscripts: Add generic function to get the filesystem type of a volume

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Stefan Schantl
2024-03-27 20:39:17 +01:00
committed by Arne Fitzenreiter
parent 5f04e70f74
commit ed91103e22

View File

@@ -883,3 +883,11 @@ running_on_oci() {
# We are not running on OCI
return 1
}
volume_fs_type() {
if [ ! -d "${1}" ]; then
return
fi
stat -f --format="%T" ${1}
}