From 174789e1309360d289016d25c608aa506259e7f1 Mon Sep 17 00:00:00 2001 From: Gutemberg Ribeiro Date: Tue, 27 Apr 2021 12:45:37 -0300 Subject: [PATCH] Fix serial parameter --- src/UFiber.Configurator/Program.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/UFiber.Configurator/Program.cs b/src/UFiber.Configurator/Program.cs index 55adaa9..5b18fb4 100644 --- a/src/UFiber.Configurator/Program.cs +++ b/src/UFiber.Configurator/Program.cs @@ -118,10 +118,9 @@ ScpClient GetSCPClient(string userName, string password, string host, int port = Console.WriteLine($"### Patching {imgName}..."); - if ((string.IsNullOrWhiteSpace(vendor) && !string.IsNullOrWhiteSpace(serial)) || - (!string.IsNullOrWhiteSpace(vendor) && string.IsNullOrWhiteSpace(serial))) + if (!string.IsNullOrWhiteSpace(vendor) && string.IsNullOrWhiteSpace(serial)) { - Console.Error.WriteLine($"To set the GPON Serial Number, you must pass both --vendor and --serial"); + Console.Error.WriteLine($"To set the GPON Serial Number, you must pass both --vendor and --serial. You can skip the --vendor if you provide the full serial as HEX to the --serial."); Environment.ExitCode = -1; return; } @@ -130,6 +129,10 @@ ScpClient GetSCPClient(string userName, string password, string host, int port = ram.SetGponId(vendor); ram.SetGponSerialNumber(serial); } + else if (string.IsNullOrWhiteSpace(vendor) && !string.IsNullOrWhiteSpace(serial)) + { + ram.SetGponSerialNumber(serial); + } if (!string.IsNullOrWhiteSpace(mac)) {