aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/functions/system.sh
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/lib/functions/system.sh')
-rw-r--r--package/base-files/files/lib/functions/system.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh
index 22eb00c515..29de2e5dd6 100644
--- a/package/base-files/files/lib/functions/system.sh
+++ b/package/base-files/files/lib/functions/system.sh
@@ -283,3 +283,7 @@ macaddr_canonicalize() {
printf "%02x:%02x:%02x:%02x:%02x:%02x" 0x${canon// / 0x} 2>/dev/null
}
+
+dt_is_enabled() {
+ grep -q okay "/proc/device-tree/$1/status"
+}