Bladeren bron

check if netclient exists

abhishek9686 1 jaar geleden
bovenliggende
commit
96c6495585
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3 0
      scripts/nm-quick.sh

+ 3 - 0
scripts/nm-quick.sh

@@ -665,6 +665,9 @@ print_success() {
 
 cleanup() {
 	# 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
 		local node_id=$(netclient list | jq '.[0].node_id' 2>/dev/null)
 		# trim doublequotes