diff options
author | Jonathan Bauer | 2019-12-13 15:18:36 +0100 |
---|---|---|
committer | Jonathan Bauer | 2019-12-13 15:18:36 +0100 |
commit | 0da1f903c8be383e188ee09e25f847bee38a6608 (patch) | |
tree | 5af3e4b94cdfd21b90bfa885c942c802d510843e /core/modules/slx-issue | |
parent | [hardware-stats] Add NVMe support (diff) | |
download | mltk-0da1f903c8be383e188ee09e25f847bee38a6608.tar.gz mltk-0da1f903c8be383e188ee09e25f847bee38a6608.tar.xz mltk-0da1f903c8be383e188ee09e25f847bee38a6608.zip |
[slx-issue] use slx-tools for ID44 detection
Diffstat (limited to 'core/modules/slx-issue')
-rwxr-xr-x | core/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue b/core/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue index 39b337b0..de6331c7 100755 --- a/core/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue +++ b/core/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue @@ -17,6 +17,8 @@ # First script for initial ramfs for OpenSLX linux stateless clients ############################################################################# +export PATH=$PATH:/opt/openslx/bin:/opt/openslx/sbin + # Set greeting and add information about the booted system declare -rg INFILE=/opt/openslx/etc/issue.template @@ -52,13 +54,14 @@ system="$system_manufacturer $system_product" # Support the boot interface name eventually saved as SLX_PXE_NETIF # from the new dracut-based stage3, fallback to old eth0 if not set linkspeed=$(cat /sys/class/net/${SLX_PXE_NETIF:-eth0}/speed) -tmpstatus=$(grep -m1 ' /tmp ' /proc/mounts | awk '{print $3}') -if [ -z "$tmpstatus" ] || [ "$tmpstatus" = "tmpfs" ]; then + +# Detect if the system is backed by a disk +if slx-tools fs_path_isvolatile /tmp; then tmpstatus="RAMDISK" else tmpstatus="HDD" fi -tmpstatus="$(df -P | grep -m1 ' /tmp$' | awk '{printf "%.1f", $2 / 1024 / 1024}')GiB ($tmpstatus)" +tmpstatus="$(slx-tools fs_path_space /tmp | awk '{printf "%.1f", $2 / 1024 / 1024}')GiB ($tmpstatus)" cat >> "$TMPFILE" <<EOF System model:%space% $system |