Lines 21-26
Link Here
|
21 |
import re |
21 |
import re |
22 |
import glob |
22 |
import glob |
23 |
import os |
23 |
import os |
|
|
24 |
import platform |
24 |
|
25 |
|
25 |
d = dialog.Dialog() |
26 |
d = dialog.Dialog() |
26 |
client_profile = GLIClientConfiguration.ClientConfiguration() |
27 |
client_profile = GLIClientConfiguration.ClientConfiguration() |
Lines 541-557
Link Here
|
541 |
|
542 |
|
542 |
#----------------------------Now for the client_config functions |
543 |
#----------------------------Now for the client_config functions |
543 |
def set_arch_template(): |
544 |
def set_arch_template(): |
544 |
template_choices = ("x86", "amd64","sparc", "alpha", "hppa", "ppc") |
545 |
arch = platform.machine() |
545 |
code, menuitem = d.menu("Please Select Architecture Template:",choices=dmenu_list_to_choices(template_choices)) |
546 |
if arch == "i586" or arch == "i686": arch = "x86" |
|
|
547 |
elif arch == "x86_64": arch = "amd64" |
548 |
elif arch == "parisc": arch = "hppa" |
549 |
template_choices = ["x86", "amd64","sparc", "alpha", "hppa", "ppc"] |
550 |
code, menuitem = d.menu("Please Select Architecture Template:",choices=dmenu_list_to_choices(template_choices),default_item=str(template_choices.index(arch)+1)) |
546 |
if code == DLG_OK: |
551 |
if code == DLG_OK: |
547 |
menuitem = template_choices[int(menuitem)-1] |
552 |
menuitem = template_choices[int(menuitem)-1] |
548 |
client_profile.set_architecture_template(None, menuitem, None) |
553 |
client_profile.set_architecture_template(None, menuitem, None) |
|
|
554 |
|
549 |
def set_logfile(): |
555 |
def set_logfile(): |
550 |
code, logfile = d.inputbox("Enter the desired path for the install log:", init="/var/log/install.log") |
556 |
code, logfile = d.inputbox("Enter the desired path for the install log:", init="/var/log/install.log") |
551 |
if code == DLG_OK: client_profile.set_log_file(None, logfile, None) |
557 |
if code == DLG_OK: client_profile.set_log_file(None, logfile, None) |
|
|
558 |
|
552 |
def set_root_mount_point(): |
559 |
def set_root_mount_point(): |
553 |
code, rootmountpoint = d.inputbox("Enter the mount point for the chroot enviornment:", init="/mnt/gentoo") |
560 |
code, rootmountpoint = d.inputbox("Enter the mount point for the chroot enviornment:", init="/mnt/gentoo") |
554 |
if code == DLG_OK: client_profile.set_root_mount_point(None, rootmountpoint, None) |
561 |
if code == DLG_OK: client_profile.set_root_mount_point(None, rootmountpoint, None) |
|
|
562 |
|
555 |
def set_client_networking(): |
563 |
def set_client_networking(): |
556 |
network_data = None |
564 |
network_data = None |