From 733c9212805517744d278ff0a7ef97722562b73b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 22 Nov 2016 16:08:20 +0100 Subject: [hardware-stats] Prefer busybox fdisk as it has GPT support --- .../data/opt/openslx/scripts/systemd-hardware_stats | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit v1.2.3-55-g7522