From fea00b36034d0f3fe9278773b5c0c796b05fa646 Mon Sep 17 00:00:00 2001
From: ohrensessel <git@ohrensessel.net>
Date: Mon, 18 Aug 2014 14:07:23 +0200
Subject: [PATCH] calculate rootfs usage instead of overlayfs

in case a target does not use overlayfs
---
 .../files/lib/gluon/announce/statistics.d/overlay_usage      | 5 -----
 .../files/lib/gluon/announce/statistics.d/rootfs_usage       | 4 ++++
 2 files changed, 4 insertions(+), 5 deletions(-)
 delete mode 100644 package/gluon-announce/files/lib/gluon/announce/statistics.d/overlay_usage
 create mode 100644 package/gluon-announce/files/lib/gluon/announce/statistics.d/rootfs_usage

diff --git a/package/gluon-announce/files/lib/gluon/announce/statistics.d/overlay_usage b/package/gluon-announce/files/lib/gluon/announce/statistics.d/overlay_usage
deleted file mode 100644
index f6cded286..000000000
--- a/package/gluon-announce/files/lib/gluon/announce/statistics.d/overlay_usage
+++ /dev/null
@@ -1,5 +0,0 @@
-local fs = require "nixio.fs"
-local opkg = require "luci.model.ipkg"
-
-local st = fs.statvfs(opkg.overlay_root())
-return 1 - st.bfree / st.blocks
diff --git a/package/gluon-announce/files/lib/gluon/announce/statistics.d/rootfs_usage b/package/gluon-announce/files/lib/gluon/announce/statistics.d/rootfs_usage
new file mode 100644
index 000000000..8426e9e1c
--- /dev/null
+++ b/package/gluon-announce/files/lib/gluon/announce/statistics.d/rootfs_usage
@@ -0,0 +1,4 @@
+local fs = require "nixio.fs"
+
+local st = fs.statvfs("/")
+return 1 - st.bfree / st.blocks
-- 
GitLab