OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: wim1969 on January 31, 2022, 09:38:08 PM

Title: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: wim1969 on January 31, 2022, 09:38:08 PM
Hello

I have a WOL cronjob running to wake a backup truenas system,

This job worked but after the update to 22.1 it no longer works.

If I send the WOL command from Services: Wake on LAN works, but not from cron-job.

I have tried the following:
All items removed at service:wol
Removed all cronjobs regarding wol
Wol plugin removed
opnsense rebooted.
Wol plugin installed
Concerned computer added again to service:wol
Concerned WOL job added back to cronjobs

Didn't help

Any help apreciated.

Wim
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: wim1969 on February 02, 2022, 03:39:36 PM
nobody?
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: chemlud on February 02, 2022, 03:51:08 PM
Hmmm, I don't see a WOL-job for Cron in the GUI. Did you add it yourself? Re-add the job...

https://forum.opnsense.org/index.php?topic=10740.msg49314#msg49314

and then create a new cron entry in the GUI for your WOL
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: franco on February 02, 2022, 04:10:40 PM
os-wol 2.4_1 should have the cron job on 22.1


Cheers,
Franco
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: chemlud on February 02, 2022, 05:19:32 PM
Quote from: franco on February 02, 2022, 04:10:40 PM
os-wol 2.4_1 should have the cron job on 22.1


Cheers,
Franco

ooops, wrong browser window, I was looking at 19.7---
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: franco on February 02, 2022, 05:22:37 PM
Or maybe looking at the time machine... ;)


Cheers,
Franco
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: wim1969 on February 03, 2022, 09:44:20 PM

Hmmm, I don't see a WOL-job for Cron in the GUI. Did you add it yourself? Re-add the job...

I did in the past.

About a year ago I installed the WOL plugin and edited this file.
root@OPNsense:~ # edit /usr/local/opnsense/service/conf/actions.d/actions_wol.conf

[wake]
command:/usr/local/bin/wol -i
parameters: %s %s
type:script
description:Wake-on-LAN

This worked like a charm until the upgrade to 22.1

I removed the WOL plugin and I can see that this file is removed but I stil see this option available.
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: wim1969 on February 03, 2022, 09:54:59 PM
so it seems like there is some old stuff still there
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: franco on February 04, 2022, 08:33:29 AM
Define "still there". From what I can see in the code the cron job is there in 22.1 and that's all we can make sure of?


Cheers,
Franco
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: chemlud on February 04, 2022, 09:13:14 AM
Hmm, I had a look in the fresh install of 22.1 I did last weekend, WOL is installed, but I don't see no Cron job in the GUI...
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: chemlud on February 04, 2022, 09:23:13 AM
PS: OMG! It's there, but the very end of the list is not visible and WOL ("Wake-On-LAN for host...") is the LAST task in the drop-down menu...

The window for "new Cron task" can't be moved to the upper edge of the screen to see more of the drop-down menu. :-O
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: franco on February 04, 2022, 12:59:59 PM
Nice catch, thanks! https://github.com/opnsense/core/commit/611f03e78b1

# opnsense-patch 611f03e78b1


Cheers,
Franco
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: wim1969 on February 04, 2022, 07:49:26 PM
Quote from: franco on February 04, 2022, 08:33:29 AM
Define "still there". From what I can see in the code the cron job is there in 22.1 and that's all we can make sure of?

Cheers,
Franco

What I meant was that even though I uninstalled the WOL plugin, the Cron option for WOL was still there.
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: wim1969 on February 04, 2022, 07:51:13 PM
Quote from: chemlud on February 04, 2022, 09:23:13 AM
It's there, but the very end of the list is not visible and WOL ("Wake-On-LAN for host...") is the LAST task in the drop-down menu...

The window for "new Cron task" can't be moved to the upper edge of the screen to see more of the drop-down menu. :-O

If you just start typing it wil sort itself.
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: franco on February 04, 2022, 08:21:06 PM
Quote from: wim1969 on February 04, 2022, 07:49:26 PM
What I meant was that even though I uninstalled the WOL plugin, the Cron option for WOL was still there.

It means either configd wasn't restarted yet or there is another file copy in the directory that was put there manually.

Let's try to rule out #1

# service configd restart


Cheers,
Franco
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: wim1969 on February 04, 2022, 09:06:10 PM
I changed te notation from
10.0.0.0 F0:DE:F1:03:24:70
to
10.0.0.255 F0:DE:F1:03:24:70

And it works
:-[  :)
Title: Re: WOL Cron Job is not working anymore after upgrade to 22.1
Post by: chemlud on February 04, 2022, 09:37:12 PM
hmmm...

https://forum.netgate.com/topic/28752/wake-on-lan-cron