mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-20 07:53:01 +02:00
* Kernel-Multicast entfernt. * MC-Downgrade. * Etherwake gefixt. * Shutdown-Balken umgekehrt. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@216 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
34 lines
616 B
C
34 lines
616 B
C
/* This file is part of the Wake-on-LAN GUI AddOn
|
|
*
|
|
* This program is distributed under the terms of the GNU General Public
|
|
* Licence. See the file COPYING for details.
|
|
*
|
|
* Copyright (C) 2006-03-03 weizen_42
|
|
*
|
|
*
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <fcntl.h>
|
|
#include "setuid.h"
|
|
|
|
|
|
#define BUFFER_SIZE 512
|
|
|
|
char command[BUFFER_SIZE];
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
if (!(initsetuid()))
|
|
exit(1);
|
|
|
|
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/etherwake -i %s %s", argv[2], argv[1]);
|
|
safe_system(command);
|
|
|
|
return(0);
|
|
}
|