|
Lines 344-350
Link Here
|
| 344 |
def set_networking(): |
344 |
def set_networking(): |
| 345 |
# This section will be for setting up network interfaces, defining DNS servers, default routes/gateways, etc. |
345 |
# This section will be for setting up network interfaces, defining DNS servers, default routes/gateways, etc. |
| 346 |
while 1: |
346 |
while 1: |
| 347 |
menulist = ["Edit Interfaces", "DNS Servers", "Default Gateway", "Hostname", "Domain Name", "NIS Domain Name"] |
347 |
menulist = ["Edit Interfaces", "DNS Servers", "Default Gateway", "Hostname", "Domain Name", "HTTP Proxy", "FTP Proxy", "RSYNC Proxy", "NIS Domain Name"] |
| 348 |
code, menuitem = d.menu("Choose an option", choices=dmenu_list_to_choices(menulist), cancel="Done") |
348 |
code, menuitem = d.menu("Choose an option", choices=dmenu_list_to_choices(menulist), cancel="Done") |
| 349 |
if code != DLG_OK: break |
349 |
if code != DLG_OK: break |
| 350 |
menuitem = menulist[int(menuitem)-1] |
350 |
menuitem = menulist[int(menuitem)-1] |
|
Lines 421-426
Link Here
|
| 421 |
if type(domain) != str: |
421 |
if type(domain) != str: |
| 422 |
d.msgbox("Incorrect domain name! It must be a string. Not saved.") |
422 |
d.msgbox("Incorrect domain name! It must be a string. Not saved.") |
| 423 |
if code == DLG_OK: install_profile.set_domainname(None, domain, None) |
423 |
if code == DLG_OK: install_profile.set_domainname(None, domain, None) |
|
|
424 |
elif menuitem == "HTTP Proxy": |
| 425 |
code, http_proxy = d.inputbox("Enter a HTTP Proxy if you have one.") |
| 426 |
if not GLIUtility.is_uri(http_proxy) |
| 427 |
d.msgbox("Incorrect HTTP Proxy! It must be a uri. Not saved.") |
| 428 |
if code == DLG_OK: install_profile.set_http_proxy(None, http_proxy, None) |
| 429 |
elif menuitem == "FTP Proxy": |
| 430 |
code, ftp_proxy = d.inputbox("Enter a FTP Proxy if you have one.") |
| 431 |
if not GLIUtility.is_uri(ftp_proxy) |
| 432 |
d.msgbox("Incorrect FTP Proxy! It must be a uri. Not saved.") |
| 433 |
if code == DLG_OK: install_profile.set_ftp_proxy(None, ftp_proxy, None) |
| 434 |
elif menuitem == "RSYNC Proxy": |
| 435 |
code, rsync_proxy = d.inputbox("Enter a RSYNC Proxy if you have one.") |
| 436 |
if not GLIUtility.is_uri(rsync_proxy) |
| 437 |
d.msgbox("Incorrect RSYNC Proxy! It must be a uri. Not saved.") |
| 438 |
if code == DLG_OK: install_profile.set_rsync_proxy(None, rsync_proxy, None) |
| 424 |
elif menuitem == "NIS Domain Name": |
439 |
elif menuitem == "NIS Domain Name": |
| 425 |
code, nisdomain = d.inputbox("Enter the desired NIS domain name (if you don't know what this is, don't enter one.)") |
440 |
code, nisdomain = d.inputbox("Enter the desired NIS domain name (if you don't know what this is, don't enter one.)") |
| 426 |
if type(nisdomain) != str: |
441 |
if type(nisdomain) != str: |