소스 검색

Update haos-vm-v5.sh

 `awk` is more efficient than using `tr` as it doesn't need to create a new process
tteckster 2 년 전
부모
커밋
f1be33211e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      vm/haos-vm-v5.sh

+ 1 - 1
vm/haos-vm-v5.sh

@@ -18,7 +18,7 @@ EOF
 }
 header_info
 echo -e "\n Loading..."
-GEN_MAC=02:$(openssl rand -hex 5 | sed 's/\(..\)/\1:/g; s/.$//' | tr '[:lower:]' '[:upper:]')
+GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
 NEXTID=$(pvesh get /cluster/nextid)
 VERSIONS=( stable beta dev )
 for version in "${VERSIONS[@]}"; do