mirror of
https://github.com/Unifi-Tools/UFiber.Configurator.git
synced 2025-02-05 18:28:28 +00:00
Merge pull request #4 from Unifi-Tools/fix-serial
Allow --serial without --vendor
This commit is contained in:
commit
640627f637
|
@ -118,10 +118,9 @@ rootCommand.Handler = CommandHandler
|
||||||
|
|
||||||
Console.WriteLine($"### Patching {imgName}...");
|
Console.WriteLine($"### Patching {imgName}...");
|
||||||
|
|
||||||
if ((string.IsNullOrWhiteSpace(vendor) && !string.IsNullOrWhiteSpace(serial)) ||
|
if (!string.IsNullOrWhiteSpace(vendor) && string.IsNullOrWhiteSpace(serial))
|
||||||
(!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;
|
Environment.ExitCode = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -130,6 +129,10 @@ rootCommand.Handler = CommandHandler
|
||||||
ram.SetGponId(vendor);
|
ram.SetGponId(vendor);
|
||||||
ram.SetGponSerialNumber(serial);
|
ram.SetGponSerialNumber(serial);
|
||||||
}
|
}
|
||||||
|
else if (string.IsNullOrWhiteSpace(vendor) && !string.IsNullOrWhiteSpace(serial))
|
||||||
|
{
|
||||||
|
ram.SetGponSerialNumber(serial);
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(mac))
|
if (!string.IsNullOrWhiteSpace(mac))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user