| {{ lang._('Interface') }} | {{ lang._('MAC') }} | +{{ lang._('Port') }} | {{ lang._('Description') }} | {{ lang._('Commands') }} | |||
|---|---|---|---|---|---|---|---|
| + |
From 6d4f941745ae650e3689e17a2444e05e7211c859 Mon Sep 17 00:00:00 2001
From: Samy <12219635+touzenesmy@users.noreply.github.com>
Date: Mon, 18 May 2026 14:38:29 -0400
Subject: [PATCH 5/7] Removed if statement for migration
Changed function for autofill 40000 for migration by default. Port will be 9 as default for new installs.
---
.../mvc/app/models/OPNsense/Wol/Migrations/M1_0_1.php | 11 +++--------
.../opnsense/mvc/app/views/OPNsense/Wol/index.volt | 1 +
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/Migrations/M1_0_1.php b/net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/Migrations/M1_0_1.php
index 17de9f220d..f0378b9f34 100644
--- a/net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/Migrations/M1_0_1.php
+++ b/net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/Migrations/M1_0_1.php
@@ -1,7 +1,7 @@
+ * Copyright (C) 2026 touzenesmy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,19 +33,14 @@
class M1_0_1 extends BaseModelMigration
{
/**
- * Existing WoL hosts predate the configurable port and were always
- * sent to UDP port 40000 (the previous hard-coded value). Preserve
- * that behaviour on upgrade so existing hosts keep working; only new
- * hosts get the sane default of 9.
+ * Migrates from hardcoded port
* @param $model
*/
public function run($model)
{
parent::run($model);
foreach ($model->wolentry->iterateItems() as $host) {
- if (empty((string)$host->port)) {
- $host->port = '40000';
- }
+ $host->port = '40000';
}
}
}
\ No newline at end of file
diff --git a/net/wol/src/opnsense/mvc/app/views/OPNsense/Wol/index.volt b/net/wol/src/opnsense/mvc/app/views/OPNsense/Wol/index.volt
index 636edabd85..61085f8555 100644
--- a/net/wol/src/opnsense/mvc/app/views/OPNsense/Wol/index.volt
+++ b/net/wol/src/opnsense/mvc/app/views/OPNsense/Wol/index.volt
@@ -103,6 +103,7 @@ $( document ).ready(function() {
+ | ||||||