aux/wpa: make sure essid is configured, dont make factotum ask for essid
This commit is contained in:
parent
bf2dd0c6bd
commit
d3773c4355
1 changed files with 7 additions and 7 deletions
|
@ -398,19 +398,19 @@ main(int argc, char *argv[])
|
||||||
if((fd = dial(addr, nil, devdir, &cfd)) < 0)
|
if((fd = dial(addr, nil, devdir, &cfd)) < 0)
|
||||||
sysfatal("dial: %r");
|
sysfatal("dial: %r");
|
||||||
|
|
||||||
if(essid[0] != 0)
|
if(essid[0] != 0){
|
||||||
if(fprint(cfd, "essid %s", essid) < 0)
|
if(fprint(cfd, "essid %s", essid) < 0)
|
||||||
sysfatal("write essid: %r");
|
sysfatal("write essid: %r");
|
||||||
|
} else {
|
||||||
|
getessid();
|
||||||
|
if(essid[0] == 0)
|
||||||
|
sysfatal("no essid set");
|
||||||
|
}
|
||||||
|
|
||||||
if(prompt){
|
if(prompt){
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
if(essid[0] == 0)
|
s = smprint("proto=wpapsk essid=%q !password?", essid);
|
||||||
getessid();
|
|
||||||
if(essid[0] != 0)
|
|
||||||
s = smprint("proto=wpapsk essid=%q !password?", essid);
|
|
||||||
else
|
|
||||||
s = smprint("proto=wpapsk essid? !password?");
|
|
||||||
auth_getkey(s);
|
auth_getkey(s);
|
||||||
free(s);
|
free(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue