]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/initscripts/system/functions
initscripts: Add generic function to get the filesystem type of a volume
[ipfire-2.x.git] / src / initscripts / system / functions
index 5a26aef45f843b55b95e628dbc93111a412b425f..b610143ab11eceebcc329fa2773c45035db9ed8a 100644 (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}
+}