Change wifi connection (without ssh)

Hi!
I tried the yun in a different place rather then home, with a different wifi connection.
It was not very clear from the tutorial how to reconfigure the wifi and reset the wifi name and password. I cannot access to the linux machine by ssh (the linux machine not connected in the new wifi) and the access point was not up (I don't know if it is intended to be up if it can not connect to the wifi).
But I could do something from the atmega.. (I love this yun & bridge system, really, super good job)

I share my small sketch, maybe could be useful to someoneelse!
Please tells me if anyone has some advice or some fixes

/*
  
  Based on: 
    Examples > Bridge > Process
    Running process using Process class by Cristian Maglie
  
    Examples > Bridge > WifiStatus
    WiFi Status by Federico Fissore
  
  This example code is in the public domain.
  
 */

#define NEXT_PAGE "..........................................................................."
#include <Process.h>

void setup() {
  Bridge.begin();
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Hello.");
  printMenu();
}

void loop() {
  if (Serial.available() > 0) {
    int in = Serial.read() -'0';
    switch(in) {
      case 1: runCpuInfo();  break;
      case 2: runCurl();     break;
      case 3: runScan();     break;
      case 4: runLua();      break;
      case 5: runCat();      break;
      case 6: runIfconfig(); break;
      case 7: runWifiup();   break;
      default: Serial.println("Enter a number between 1 and 7");
               break;
    }
  }
  delay(50);
}

void printMenu() {
  Serial.println("\n\n\nNetwork Utility");
  Serial.println("press:");
  Serial.println("1. cpu info");
  Serial.println("2. curl test");
  Serial.println("3. scan networks in range");
  Serial.println("4. print wifi status");
  Serial.println("5. print network config files");
  Serial.println("6. print active networks");
  Serial.println("7. activate access point");
  Serial.println("\n\n\n");
  delay(550);
}

void runLua() {
  Process p;
  p.runShellCommand("/usr/bin/pretty-wifi-info.lua");
  printShellOutput(p);
}

void runCurl() {
  Process p;
  p.begin("curl");
  p.addParameter("http://arduino.cc/asciilogo.txt");
  p.run();
  printShellOutput(p);
}

void runCpuInfo() {
  Process p;
  p.begin("cat");
  p.addParameter("/proc/cpuinfo");
  p.run();
  printShellOutput(p);
}

void runScan() {
  Process p;
  p.begin("iwlist");
  p.addParameter("scan");
  p.run();
  printShellOutput(p);
}

void runIfconfig() {
  Process p;
  p.begin("ifconfig");
  p.run();
  printShellOutput(p);
}

void runCat() {
  Serial.println(NEXT_PAGE);
  Serial.println("/etc/config/wireless");
  Process p;
  p.begin("cat");
  p.addParameter("/etc/config/wireless");
  p.run();
  printShellOutput(p);
  
  Serial.println("/etc/config/network");  
  p.begin("cat");
  p.addParameter("/etc/config/network");
  p.run();
  printShellOutput(p);
}

void runWifiup() {
  Serial.print('.');
  Process p;
  p.begin("ifup");
  p.addParameter("wan");
  p.run();
  delay(3000);
  Serial.print('.');
  p.begin("wifi");
  p.run();
  delay(3000);
  printShellOutput(p);
}

void printShellOutput(Process &p) {
  while (p.available() > 0) {
    char c = p.read();
    Serial.print(c);
  }
  Serial.println();
  Serial.flush();
  Serial.println(NEXT_PAGE);
  delay(1000);
}

Unless you have disabled the wifi-live-or-reset in rc.local the Yun should open it's AP in a few minutes....

Many people don't seem to understand/like this behavior, but it is there for exactly the situation you describe.