fix issues

pull/360/head
vapao 2021-07-27 11:46:19 +08:00
parent 1b32f356d0
commit 44d489c123
1 changed files with 2 additions and 2 deletions

View File

@ -186,8 +186,8 @@ def fetch_host_extend(ssh):
"free -m | awk 'NR==2{print $2}'",
"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 $4}' | awk -F'' '{print $2}'"
"fdisk -l 2> /dev/null | grep '^Disk /' | awk '{print $5}'",
"fdisk -l 2> /dev/null | grep '^磁盘 /' | awk '{print $4}' | awk -F'' '{print $2}'"
]
code, out = ssh.exec_command(';'.join(commands))
if code != 0: