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 @@ rootCommand.Handler = CommandHandler 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 @@ rootCommand.Handler = CommandHandler ram.SetGponId(vendor); ram.SetGponSerialNumber(serial); } + else if (string.IsNullOrWhiteSpace(vendor) && !string.IsNullOrWhiteSpace(serial)) + { + ram.SetGponSerialNumber(serial); + } if (!string.IsNullOrWhiteSpace(mac)) {