Changeset 30355


Ignore:
Timestamp:
10/05/14 12:27:33 (10 years ago)
Author:
gost
Message:

[titan] activate WOL at network menu

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/network.h

    r25998 r30355  
    359359        struct skin* dnsserver2 = getscreennode(network, "dnsserver2");
    360360        struct inetwork* net = getinetworkbydevice(interface);
     361        struct skin* wol = getscreennode(network, "wol");
    361362
    362363        struct skin* tmp = NULL;
     
    390391        addchoicebox(type, "0", _("static"));
    391392        addchoicebox(type, "2", _("off"));
     393       
     394        addchoicebox(wol, "0", _("disable"));
     395        addchoicebox(wol, "1", _("enable"));
     396        setchoiceboxselection(wol, getconfig("wol", NULL));
     397               
     398        if(ostrcmp(interface, "eth0") != 0 || file_exist("/proc/stb/fp/wol") == 0)
     399                wol->hidden = YES;
     400        else
     401                wol->hidden = NO;
    392402
    393403        if(net->type == 1)
     
    475485        if(save == 1)
    476486        {
     487                if(ostrcmp(interface, "eth0") == 0 && file_exist("/proc/stb/fp/wol") != 0)
     488                {
     489                        addconfig("wol",wol->ret);
     490                        if(getconfigint("wol", NULL) == 1)
     491                                system("echo enable > /proc/stb/fp/wol");
     492                        else
     493                                system("echo disable > /proc/stb/fp/wol");
     494                }
     495               
    477496                debug(50, "save settings");
    478497                debug(50, "type: %i", tmp_type);
  • titan/titan/titan.c

    r30206 r30355  
    611611        if(checkbox("UFS922") == 1 || checkbox("ATEMIO-NEMESIS") == 1)
    612612                setfanspeed(-1, 0);
     613       
     614        if(getconfigint("wol", NULL) == 1)
     615                system("echo enable > /proc/stb/fp/wol");
     616        else
     617                system("echo disable > /proc/stb/fp/wol");
    613618
    614619        system(getconfig("skriptbeforetv", NULL));
Note: See TracChangeset for help on using the changeset viewer.