diff options
author | Simon Rettberg | 2020-08-31 18:34:42 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-08-31 18:34:42 +0200 |
commit | 4e29cc6cd980fa64063af161174c908de27d524b (patch) | |
tree | f3daf061213f299dcc61c92c13efa2405374ad2c /core/modules/hardware-stats/data/opt/openslx/scripts | |
parent | [hardware-stats] Make fdisk sed compatible with GPT (diff) | |
download | mltk-4e29cc6cd980fa64063af161174c908de27d524b.tar.gz mltk-4e29cc6cd980fa64063af161174c908de27d524b.tar.xz mltk-4e29cc6cd980fa64063af161174c908de27d524b.zip |
[hardware-stats] Fix GPT PARSING
Diffstat (limited to 'core/modules/hardware-stats/data/opt/openslx/scripts')
-rwxr-xr-x | core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats index dabdacbe..d059657e 100755 --- a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats +++ b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats @@ -196,7 +196,7 @@ for disk in /dev/disk/by-path/!(*-part*|*-usb-*); do [ -L "$disk" ] || continue disk="$( readlink -f "$disk" )" DISKS+=("$disk") - slxfdisk -l "$disk" | sed -r 's/\s+[0-9]+,[0-9]+,[0-9]+/ /g;/^\// s/\s[0-9]+\.?[0-9]+[MGT]\s/ /;s/^Units: /Units =foo= /' # Work around busybox YET AGAIN changing something in an incompatible way + slxfdisk -l "$disk" | sed -r 's/\s+[0-9]+,[0-9]+,[0-9]+/ /g;/^\// s/\s[0-9]+\.?[0-9]+[MGT]\s/ /;s/^Units: /Units =foo= /' | awk '{if ($1 !~ /^[0-9]+$/ || $5 ~ /^[0-9a-f]{4}/) { print $0 } else { $5 = "0700 " $5; print $0 }}' # Work around busybox YET AGAIN changing something in an incompatible way done > "$FDISK" shopt -u extglob [ -z "$SLX_SMARTCTL_MIN_REALLOC" ] && SLX_SMARTCTL_MIN_REALLOC=0 |