Fix node rebooting procedure

Pepper is not capable of returning an error in case if a minion was
not reachable during the task run. It returns "false" in this case
which conflicts with the boolean checks. This commit changes the way
how file existence is checked, removing false positives that come from
unreachable minions.

Closes-Bug: PROD-35442
Change-Id: I6920ef3b08b948582df101ce7c080c1bd282c458
diff --git a/src/com/mirantis/mk/Debian.groovy b/src/com/mirantis/mk/Debian.groovy
index 47cd772..1b39d14 100644
--- a/src/com/mirantis/mk/Debian.groovy
+++ b/src/com/mirantis/mk/Debian.groovy
@@ -268,7 +268,7 @@
     salt.runSaltProcessStep(env, target, 'system.reboot', [], null, true, 5)
 
     common.retry(timeout, attempts) {
-        if (salt.runSaltProcessStep(env, target, 'file.file_exists', ['/tmp/rebooting'], null, true, 5)['return'][0].values()[0].toBoolean()) {
+        if (salt.runSaltProcessStep(env, target, 'cmd.run', ['test -e /tmp/rebooting || echo NOFILE'], null, true, 5)['return'][0].values()[0] != "NOFILE") {
             error("The system is still rebooting...")
         }
     }
@@ -354,4 +354,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}