Fixes, added system configuration installation if main installation was completed before

pull/4/head
parent 4c3e306c64
commit e16a586e9c

@ -401,6 +401,34 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
} }
} }
void *on_setup_system_configuration(void *);
void *on_setup_system_configuration(void *){
int size;
config_str all_parameters = yon_config_get_selection_by_key(&size,
user_gecos_parameter,
user_password_parameter,
root_password_parameter,
autologin_parameter,
xkbmodel_parameter,
xkblayout_parameter,
xkbvariant_parameter,
xkboptions_parameter,
hostname_parameter,
zone_parameter,
lang_parameter,
locale_parameter,
NULL);
if (all_parameters){
char *parameter_string = yon_char_parsed_to_string(all_parameters,size," ");
char *command = set_user_config_command(parameter_string);
if (system(command)){};
yon_char_parsed_free(all_parameters,size);
free(command);
if (parameter_string) free(parameter_string);
}
return NULL;
}
void on_page_navigation_clicked(GtkWidget *self, main_window *widgets); void on_page_navigation_clicked(GtkWidget *self, main_window *widgets);
void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
int mode = self==widgets->NextButton ? 1 : self == widgets->BackButton ? -1 : self==widgets->CancelInstallButton?-2:0; int mode = self==widgets->NextButton ? 1 : self == widgets->BackButton ? -1 : self==widgets->CancelInstallButton?-2:0;
@ -696,7 +724,8 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
} }
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION); gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
if (gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress))>0.9){ if (gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress))>0.9){
pthread_t tid;
pthread_create(&tid,NULL,on_setup_system_configuration,NULL);
} }
gtk_widget_set_sensitive(widgets->CancelInstallButton,0); gtk_widget_set_sensitive(widgets->CancelInstallButton,0);
gtk_widget_set_sensitive(widgets->NextButton,0); gtk_widget_set_sensitive(widgets->NextButton,0);
@ -902,6 +931,7 @@ void on_same_installation_device_changed(GtkWidget *, main_window *widgets){
} }
} }
void on_gparted_open();
void on_gparted_open(){ void on_gparted_open(){
yon_launch_app_with_arguments(open_gparted_command,NULL); yon_launch_app_with_arguments(open_gparted_command,NULL);
} }

@ -110,7 +110,7 @@ NULL
#define part_type_parameter "AUTOINSTALL[part_fs_type]" #define part_type_parameter "AUTOINSTALL[part_fs_type]"
#define part_type_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_fs_type]" #define part_type_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_fs_type]"
#define save_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig set [autoinstall] ",parameters, "; nice ubinstall2 --config /etc/ublinux/autoinstall'", NULL) #define save_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig set [autoinstall] ",parameters, "; nice ubinstall2 --test --config /etc/ublinux/autoinstall'", NULL)
#define set_user_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters,";nice ubinstall2 --autoconfig'",NULL) #define set_user_config_command(parameters) yon_char_unite("pkexec bash -c 'ubconfig --target system set [autoinstall] ",parameters,";nice ubinstall2 --autoconfig'",NULL)

Loading…
Cancel
Save