소스 검색

Reset the re-ZTP bit when the switch ZTPs.

Joe Clarke 1 년 전
부모
커밋
5cc42359aa
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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";