/* * return values: * -1 : abort (aka ESC) * 0 : ok * other: stay in menu */ int set_settings_cb (dia_item_t di) { int rc = 0; char *s; url_t *url; di_set_settings_last = di; switch(di) { case di_set_lang: set_choose_language(); break; case di_set_display: set_choose_display(); util_print_banner(); break; case di_set_keymap: set_choose_keytable(1); rc = 1; break; case di_set_animate: rc = dia_yesno("Use animated windows?", config.explode_win ? YES : NO); if(rc == YES) config.explode_win = 1; else if(rc == NO) config.explode_win = 0; rc = 1; break; case di_set_forceroot: rc = dia_yesno("Should the root image be loaded into the RAM disk?", config.download.instsys ? YES : NO); config.download.instsys_set = 1; if(rc == YES) config.download.instsys = 1; else if(rc == NO) config.download.instsys = 0; rc = 1; break; case di_set_rootimage: (void) dia_input2("Enter the path and name of the file to load into the RAM disk as the root file system.", &config.rootimage, 30, 0); rc = 1; break; case di_set_vnc: rc = dia_yesno("Use VNC for install?", config.vnc ? YES : NO); if(rc != ESCAPE) { if((config.vnc = rc == YES ? 1 : 0)) { config.net.do_setup |= DS_VNC; } else { config.net.do_setup &= ~DS_VNC; } } rc = 1; break; case di_set_usessh: rc = dia_yesno("Start SSH for Text Install?", config.usessh ? YES : NO); if(rc != ESCAPE) { if((config.usessh = rc == YES ? 1 : 0)) { config.net.do_setup |= DS_SSH; } else { config.net.do_setup &= ~DS_SSH; } } rc = 1; break; case di_set_startshell: rc = dia_yesno("Start shell before and after YaST?", config.startshell ? YES : NO); if(rc != ESCAPE) config.startshell = rc == YES ? 1 : 0; rc = 1; break; case di_set_slp: if(net_config_needed(1) && net_config()) { rc = 1; break; } url = url_set("slp:"); s = slp_get_install(url); url_free(url); rc = 1; if(s) { url = url_set(s); if(url->scheme) { url_free(config.url.install); config.url.install = url; rc = 0; } else { url_free(url); } } if(rc) dia_message("SLP failed", MSGTYPE_ERROR); rc = 1; break; case di_inst_net_config: net_config(); rc = 1; break; default: break; } return rc; }
if( config.net.setup & NS_DHCP && #if defined(__s390__) || defined(__s390x__) config.hwp.layer2 != LAYER2_NO && #endif !config.ifcfg.manual->ptp ) { sprintf(buf, "Automatic configuration via %s?", "DHCP"); rc = dia_yesno(buf, YES); } else { rc = NO; }