Browse Source

Reset the re-ZTP bit when the switch ZTPs.

Joe Clarke 1 year ago
parent
commit
5cc42359aa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      www/swreg/verify.php

+ 2 - 2
www/swreg/verify.php

@@ -105,10 +105,10 @@ if ($good_config && $good_image) {
     call_hook('VERIFY:SUCCESS', array($_SERVER['REMOTE_ADDR'], $config, $sn, $md5, $image));
 }
 
-$sql = 'UPDATE DEVICE_MAP SET provisioned_status = ? WHERE serial_number = ?';
+$sql = 'UPDATE DEVICE_MAP SET provisioned_status = ?, should_re_ztp = ? WHERE serial_number = ?';
 try {
     $sth = $dbh->prepare($sql);
-    $sth->execute(array($status, $sn));
+    $sth->execute(array($status, 0, $sn));
     $sth->closeCursor();
 } catch (PDOException $e) {
     echo 'ERROR: Failed to update switch status: '.$e->getMessage()."\r\n";