diff options
author | Simon Rettberg | 2016-11-22 16:08:20 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-11-22 16:08:20 +0100 |
commit | 733c9212805517744d278ff0a7ef97722562b73b (patch) | |
tree | ba4c5d1591dc72da3eb0e79e54b5755cd1cd294c | |
parent | [rfs-stage32] Support swap on GPT aswell (diff) | |
download | tm-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-x | remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats | 11 |
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 |