summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/functions.sh')
-rw-r--r--sbin/functions.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/sbin/functions.sh b/sbin/functions.sh
index 34e00ad..7af6843 100644
--- a/sbin/functions.sh
+++ b/sbin/functions.sh
@@ -502,6 +502,17 @@ is_net_fs() {
return $?
}
+# bool is_net_fs(path)
+#
+# return 0 if path is under unionfs control
+#
+# EXAMPLE: if is_union_fs / ; then ...
+#
+is_union_fs() {
+ [[ ! -x /sbin/unionctl ]] && return 1
+ unionctl "$1" --list &>/dev/null
+}
+
# bool is_uml_sys()
#
# return 0 if the currently running system is User Mode Linux