summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-19 16:07:50 +0100
committerSimon Rettberg2019-02-19 16:07:50 +0100
commit02c169ec29d359a1cb4caedde67dbb6a85784a52 (patch)
tree7ae73ca570577c71b09b5612509d392b74792f17 /core
parent[hardware-stats/rootfs-stage32] Improve HDD detection (diff)
downloadmltk-02c169ec29d359a1cb4caedde67dbb6a85784a52.tar.gz
mltk-02c169ec29d359a1cb4caedde67dbb6a85784a52.tar.xz
mltk-02c169ec29d359a1cb4caedde67dbb6a85784a52.zip
[hardware-stats/rootfs-stage32] HI JOEY!
Diffstat (limited to 'core')
-rwxr-xr-xcore/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats2
-rwxr-xr-xcore/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions2
2 files changed, 4 insertions, 0 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 02eabb41..f2076bb3 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
@@ -179,12 +179,14 @@ echo "Temp partition: $ID44 MB"
# 9) check smart values
FDISK=$(mktemp)
declare -a DISKS
+shopt -s extglob
for disk in /dev/disk/by-path/!(*-part*); do
[ -L "$disk" ] || continue
disk="$( readlink -f "$disk" )"
DISKS+=("$disk")
slxfdisk -l "$disk"
done > "$FDISK"
+shopt -u extglob
BADSECTORS=0
if which smartctl; then
ALLSMART=$(mktemp)
diff --git a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
index b767f677..5f58917d 100755
--- a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
+++ b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
@@ -158,10 +158,12 @@ if ! has_hdd; then
wait_for_udev --hdd 4
fi
+shopt -s extglob
for disk in /dev/disk/by-path/!(*-part*); do
[ -L "$disk" ] || continue
fdisk -l "$( readlink -f "$disk" )"
done > "$PARTITION_FILE"
+shopt -u extglob
if ! [ -s "$PARTITION_FILE" ]; then
echo "none" > "$PARTITION_FILE"
fi