]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/misc-progs/launch-ether-wake.c
Merge remote-tracking branch 'alfh/feature_langfixes' into next
[people/teissler/ipfire-2.x.git] / src / misc-progs / launch-ether-wake.c
index 703ace7a671499c466c02840cb58881a9189b250..cac4d3c3feb7914bb7ee2d96c25f87b4f19e552d 100644 (file)
@@ -26,7 +26,11 @@ int main(int argc, char *argv[])
        if (!(initsetuid()))
                exit(1);
 
-  snprintf(command, BUFFER_SIZE-1, "/usr/bin/ether-wake -i %s %s", argv[2], argv[1]);
+  snprintf(command, BUFFER_SIZE-1, "/usr/sbin/etherwake -i %s %s", argv[2], argv[1]);
+  safe_system(command);
+
+  /* Send magic packet with broadcast flag set. */
+  snprintf(command, BUFFER_SIZE-1, "/usr/sbin/etherwake -i %s -b %s", argv[2], argv[1]);
   safe_system(command);
 
   return(0);