Browse Source

Correct parsing of bootstrap_admin_node.log

This commit fixes parsing of $goodline and $badline strings
in the 'bootstrap_admin_node.log' which causes incorrect
behaviour of VirtualBox scripts under Windows 10.

Change-Id: Ib90582adf4d5b3aa03ade081d788e5177add4b93
Closes-Bug: #1538143
Maksim Malchuk 3 years ago
parent
commit
b09d8c6081
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      functions/product.sh

+ 3
- 3
functions/product.sh View File

@@ -39,15 +39,15 @@ wait_for_line_in_puppet_bootstrap() {
39 39
         expect "*?assword:*"
40 40
         send "$password\r"
41 41
         expect "$prompt"
42
-        send "egrep --color=none -e '$goodline' -e '$badline' /var/log/puppet/bootstrap_admin_node.log\r"
42
+        send "egrep --color=none -e '${goodline}' -e '${badline}' /var/log/puppet/bootstrap_admin_node.log\r"
43 43
         expect "$prompt"
44 44
         send "logout\r"
45 45
         expect "$prompt"
46 46
 ENDOFEXPECT
47 47
     )
48 48
 
49
-    echo "$result" | egrep "$badline" >&2 && return 1
50
-    echo "$result" | egrep -q "$goodline" && return 0
49
+    echo "$result" | grep -v grep | egrep -q "$badline" >&2 && return 1
50
+    echo "$result" | grep -v grep | egrep -q "$goodline" >&2 && return 0
51 51
     return 1
52 52
 }
53 53
 

Loading…
Cancel
Save