summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-11-22 16:08:20 +0100
committerSimon Rettberg2016-11-22 16:08:20 +0100
commit733c9212805517744d278ff0a7ef97722562b73b (patch)
treeba4c5d1591dc72da3eb0e79e54b5755cd1cd294c
parent[rfs-stage32] Support swap on GPT aswell (diff)
downloadtm-scripts-733c9212805517744d278ff0a7ef97722562b73b.tar.gz
tm-scripts-733c9212805517744d278ff0a7ef97722562b73b.tar.xz
tm-scripts-733c9212805517744d278ff0a7ef97722562b73b.zip
[hardware-stats] Prefer busybox fdisk as it has GPT support
-rwxr-xr-xremote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats11
1 files changed, 11 insertions, 0 deletions
diff --git a/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats b/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
index 4dd53d7b..cc5165dc 100755
--- a/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
+++ b/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
@@ -22,6 +22,17 @@ mktemp() {
done
}
+fdisk() {
+ local binary RET
+ for binary in "/opt/openslx/sbin/fdisk" "busybox fdisk" "fdisk"; do
+ $binary "$@"
+ RET=$?
+ [ "$RET" = "127" ] && continue # command not found
+ return $RET
+ done
+ return 127
+}
+
if [ -z "$SLX_REMOTE_LOG" ]; then
echo "No remote log url given, will not report"
exit 1