From 464daa22264ca8c93701d0810d2a8aaf32c6bf54 Mon Sep 17 00:00:00 2001 From: Ernesto Castellotti Date: Wed, 11 Jan 2023 19:16:39 +0100 Subject: Add sfpModel parameter and remove successCallback --- _ont/ont-huawei-ma5671a-root-web.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to '_ont') diff --git a/_ont/ont-huawei-ma5671a-root-web.md b/_ont/ont-huawei-ma5671a-root-web.md index efb0d85..18652d7 100644 --- a/_ont/ont-huawei-ma5671a-root-web.md +++ b/_ont/ont-huawei-ma5671a-root-web.md @@ -185,31 +185,35 @@ FALCON => saveenv return; } - await lantiqRootUboot(port, + let result = await lantiqRootUboot(port, "Huawei MA5671A", (msg) => { loading(msg, 0); }, (err) => { showError(err, 0); console.log(err); - }, - () => { - showSuccess("Congratulations! Step completed.", 0); } ); - await unlockHuaweiShell(port, + if (result) { + showSuccess("Congratulations! Step completed.", 0); + } else { + return; + } + + result = await unlockHuaweiShell(port, (msg) => { loading(msg, 1); }, (err) => { showError(err, 1); console.log(err); - }, - () => { - showSuccess("Congratulations! Step completed.", 1); } ); + + if (result) { + showSuccess("Congratulations! Step completed.", 1); + } } -- cgit v1.2.3