فهرست منبع

check if netclient exists

abhishek9686 1 سال پیش
والد
کامیت
96c6495585
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      scripts/nm-quick.sh

+ 3 - 0
scripts/nm-quick.sh

@@ -665,6 +665,9 @@ print_success() {
 
 
 cleanup() {
 cleanup() {
 	# remove the existing netclient's instance from the existing network
 	# remove the existing netclient's instance from the existing network
+	if ! command -v netclient >/dev/null 2>&1; then
+		return
+	fi
 	if command -v nmctl >/dev/null 2>&1; then
 	if command -v nmctl >/dev/null 2>&1; then
 		local node_id=$(netclient list | jq '.[0].node_id' 2>/dev/null)
 		local node_id=$(netclient list | jq '.[0].node_id' 2>/dev/null)
 		# trim doublequotes
 		# trim doublequotes