From 0bb559ceb2fb3821e16498691de2052503ef8138 Mon Sep 17 00:00:00 2001 From: vapao Date: Mon, 12 Jul 2021 23:02:21 +0800 Subject: [PATCH] fix issue --- spug_api/apps/host/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/apps/host/utils.py b/spug_api/apps/host/utils.py index c8a18b89..6e38a248 100644 --- a/spug_api/apps/host/utils.py +++ b/spug_api/apps/host/utils.py @@ -187,7 +187,7 @@ def fetch_host_extend(ssh): "hostname -I", "cat /etc/os-release | grep PRETTY_NAME | awk -F \\\" '{print $2}'", "fdisk -l | grep '^Disk /' | awk '{print $5}'", - "fdisk -l | grep '^磁盘 /' | awk '{print $5}'" + "fdisk -l | grep '^磁盘 /' | awk '{print $4}' | awk -F',' '{print $2}'" ] code, out = ssh.exec_command(';'.join(commands)) if code != 0: