2.1.RC1: WakeOnLan does not work

Bug #1173663 reported by Markus Kachel
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OCS Inventory: OCSReports
Fix Released
High
Erwan

Bug Description

OCS Inventory NG is running on a 64Bit Debian 6.0 server. Additionally packages from dotdeb.org are included for a more current version of PHP 5.3 and MySQL. When trying to wake up a client from the website the client does not wake up.
I did some testing with a small standalone php script to send the magic packet to one of my PCs. When using fsockopen with the PCs IP address the magic packet seems to get sent without error but the PC does not wake up. To my knowledge the magic packet should be send to the broadcast address but this is not possible because fsockopen shows an error that there are no rights to send something to the broadcast address (also tried runing the script as root with the same error).

For the moment I did a quick hack of the function_wol.php to not use fsockopen but use exec instead to run the wakeonlan tool:
exec("/usr/bin/wakeonlan ".$mac);
I did not include the IP address because the server and all clients are on the same subnet so the default 255.255.255.255 is just fine in my case.

Revision history for this message
Nachtfalke (alexander-wilke) wrote :

Fix from another forum user to make WOL work with broadcast:

http://forums.ocsinventory-ng.org/viewtopic.php?id=13008

I just added this because the user does not have any launchpad account

Revision history for this message
Markus Kachel (markus-kachel) wrote :

I recently updates my enviroment to Debian 7 (whezzy) with PHP 5.4 form dotdeb. I tested the fix from the linked forum thread and it works fine for me. I would be good if this could be included in the next release of OCS.

Changed in ocsinventory-ocsreports:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → airone (airone)
airone (airone)
Changed in ocsinventory-ocsreports:
assignee: airone (airone) → nobody
Erwan (airoine)
Changed in ocsinventory-ocsreports:
status: Confirmed → Fix Committed
assignee: nobody → Erwan (airoine)
Arthur Jaouen (arthur-z)
Changed in ocsinventory-ocsreports:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.