From 5821b5b9984f342af515bc15b8da7d3840986614 Mon Sep 17 00:00:00 2001 From: ohrensessel 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 gluon/gluon-announce/files/lib/gluon/announce/statistics.d/overlay_usage create mode 100644 gluon/gluon-announce/files/lib/gluon/announce/statistics.d/rootfs_usage diff --git a/gluon/gluon-announce/files/lib/gluon/announce/statistics.d/overlay_usage b/gluon/gluon-announce/files/lib/gluon/announce/statistics.d/overlay_usage deleted file mode 100644 index f6cded2..0000000 --- a/gluon/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/gluon/gluon-announce/files/lib/gluon/announce/statistics.d/rootfs_usage b/gluon/gluon-announce/files/lib/gluon/announce/statistics.d/rootfs_usage new file mode 100644 index 0000000..8426e9e --- /dev/null +++ b/gluon/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