added images to make this an all-in-one package.
[www-register-wizard.git] / application / controllers / confirm.php
index 2f399f5..dfd0184 100644 (file)
@@ -11,7 +11,6 @@ include 'plc_header.php';
 
 // Common functions
 require_once 'plc_functions.php';
-require_once 'plc_sorts.php';
 include 'plc_objects.php';
 
 
@@ -164,12 +163,13 @@ class Confirm extends Controller {
        {
                global $api, $plc;
                $hostname = $data['node_id'];
-               $api->UpdateNode( $hostname, array( "boot_state" => 'rins') );
+               $api->UpdateNode( $hostname, array( "boot_state" => 'reinstall') );
                $ret = $api->RebootNodeWithPCU( $hostname );
-               if ( $ret != 0 ) {
+               if ( "$ret" != "0" ) {
                        $data['error'] = $api->error();
+               } else {
+                       $data['error'] = $ret;
                }
-               $data['error'] = $api->error();
        }
 }
 ?>