version 1.29, 2019/07/24 10:22:04 |
version 1.29.2.5, 2019/11/17 13:45:26 |
Line 117 distinfo dist_list[] = { |
|
Line 117 distinfo dist_list[] = { |
|
{"games", SET_GAMES, false, MSG_set_games, NULL}, |
{"games", SET_GAMES, false, MSG_set_games, NULL}, |
{"man", SET_MAN_PAGES, false, MSG_set_man_pages, NULL}, |
{"man", SET_MAN_PAGES, false, MSG_set_man_pages, NULL}, |
{"misc", SET_MISC, false, MSG_set_misc, NULL}, |
{"misc", SET_MISC, false, MSG_set_misc, NULL}, |
|
{"rescue", SET_RESCUE, false, MSG_set_rescue, NULL}, |
{"tests", SET_TESTS, false, MSG_set_tests, NULL}, |
{"tests", SET_TESTS, false, MSG_set_tests, NULL}, |
{"text", SET_TEXT_TOOLS, false, MSG_set_text_tools, NULL}, |
{"text", SET_TEXT_TOOLS, false, MSG_set_text_tools, NULL}, |
|
|
Line 537 boot_media_still_needed(void) |
|
Line 538 boot_media_still_needed(void) |
|
return 0; |
return 0; |
} |
} |
|
|
|
bool |
|
root_is_read_only(void) |
|
{ |
|
struct statvfs sb; |
|
|
|
if (statvfs("/", &sb) == 0) |
|
return sb.f_flag & ST_RDONLY; |
|
|
|
return false; |
|
} |
|
|
/* |
/* |
* Get from a CDROM distribution. |
* Get from a CDROM distribution. |
* Also used on "installation using bootable install media" |
* Also used on "installation using bootable install media" |
Line 916 extract_file(distinfo *dist, int update) |
|
Line 928 extract_file(distinfo *dist, int update) |
|
if (!file_exists_p(path)) { |
if (!file_exists_p(path)) { |
|
|
#ifdef SUPPORT_8_3_SOURCE_FILESYSTEM |
#ifdef SUPPORT_8_3_SOURCE_FILESYSTEM |
/* |
/* |
* Update path to use dist->name truncated to the first eight |
* Update path to use dist->name truncated to the first eight |
* characters and check again |
* characters and check again |
*/ |
*/ |
(void)snprintf(path, sizeof path, "%s/%.8s%.4s", /* 4 as includes '.' */ |
(void)snprintf(path, sizeof path, |
ext_dir_for_set(dist->name), dist->name, set_postfix(dist->name)); |
"%s/%.8s%.4s", /* 4 as includes '.' */ |
|
ext_dir_for_set(dist->name), dist->name, |
|
set_postfix(dist->name)); |
|
|
if (!file_exists_p(path)) { |
if (!file_exists_p(path)) { |
#endif /* SUPPORT_8_3_SOURCE_FILESYSTEM */ |
#endif /* SUPPORT_8_3_SOURCE_FILESYSTEM */ |
|
tarstats.nnotfound++; |
|
|
tarstats.nnotfound++; |
char *err = str_arg_subst(msg_string(MSG_notarfile), |
|
1, &dist->name); |
hit_enter_to_continue(MSG_notarfile, NULL); |
hit_enter_to_continue(err, NULL); |
return SET_RETRY; |
free(err); |
} |
free(owd); |
|
return SET_RETRY; |
|
} |
#ifdef SUPPORT_8_3_SOURCE_FILESYSTEM |
#ifdef SUPPORT_8_3_SOURCE_FILESYSTEM |
} |
} |
#endif /* SUPPORT_8_3_SOURCE_FILESYSTEM */ |
#endif /* SUPPORT_8_3_SOURCE_FILESYSTEM */ |
Line 954 extract_file(distinfo *dist, int update) |
|
Line 972 extract_file(distinfo *dist, int update) |
|
|
|
/* now extract set files into "./". */ |
/* now extract set files into "./". */ |
rval = run_program(RUN_DISPLAY | RUN_PROGRESS, |
rval = run_program(RUN_DISPLAY | RUN_PROGRESS, |
"progress -zf %s tar --chroot -xpf -", path); |
"progress -zf %s tar --chroot " |
|
TAR_EXTRACT_FLAGS " -", path); |
|
|
chdir(owd); |
chdir(owd); |
free(owd); |
free(owd); |
Line 1129 get_and_unpack_sets(int update, msg setu |
|
Line 1148 get_and_unpack_sets(int update, msg setu |
|
"> /tmp/boot.cfg.tmp'"); |
"> /tmp/boot.cfg.tmp'"); |
mv_within_target_or_die("/tmp/boot.cfg.tmp", |
mv_within_target_or_die("/tmp/boot.cfg.tmp", |
"/boot.cfg"); |
"/boot.cfg"); |
|
|
} |
} |
} |
} |
|
|
|
#ifdef MD_BOOT_CFG_FINALIZE |
|
if (target_file_exists_p("/boot.cfg")) { |
|
MD_BOOT_CFG_FINALIZE("/boot.cfg"); |
|
} |
|
#endif |
|
|
/* Save keyboard type */ |
/* Save keyboard type */ |
save_kb_encoding(); |
save_kb_encoding(); |
|
|
Line 1445 set_timezone(void) |
|
Line 1471 set_timezone(void) |
|
menu_no = new_menu(NULL, NULL, 14, 23, 9, |
menu_no = new_menu(NULL, NULL, 14, 23, 9, |
12, 32, MC_ALWAYS_SCROLL | MC_NOSHORTCUT, |
12, 32, MC_ALWAYS_SCROLL | MC_NOSHORTCUT, |
tzm_set_names, NULL, NULL, |
tzm_set_names, NULL, NULL, |
"\nPlease consult the install documents.", NULL); |
"\nPlease consult the install documents.", |
|
MSG_exit_menu_generic); |
if (menu_no < 0) |
if (menu_no < 0) |
goto done; /* error - skip timezone setting */ |
goto done; /* error - skip timezone setting */ |
|
|
Line 2022 usage_set_from_parts(struct partition_us |
|
Line 2049 usage_set_from_parts(struct partition_us |
|
return usage_info_list_from_parts(&wanted->infos, &wanted->num, parts); |
return usage_info_list_from_parts(&wanted->infos, &wanted->num, parts); |
} |
} |
|
|
bool |
struct disk_partitions * |
install_desc_from_parts(struct install_partition_desc *install, |
get_inner_parts(struct disk_partitions *parts) |
struct disk_partitions *parts) |
|
{ |
{ |
struct disk_partitions *inner_parts; |
|
daddr_t start, size; |
daddr_t start, size; |
part_id pno; |
part_id pno; |
struct disk_part_info info; |
struct disk_part_info info; |
|
|
memset(install, 0, sizeof(*install)); |
if (parts->pscheme->secondary_scheme == NULL) |
|
return NULL; |
|
|
if (parts->pscheme->secondary_scheme != NULL) { |
start = -1; |
start = -1; |
size = -1; |
size = -1; |
if (parts->pscheme->guess_install_target == NULL || |
if (parts->pscheme->guess_install_target != NULL && |
!parts->pscheme->guess_install_target(parts, &start, &size)) { |
parts->pscheme->guess_install_target(parts, |
for (pno = 0; pno < parts->num_part; pno++) { |
&start, &size)) { |
if (!parts->pscheme->get_part_info(parts, pno, &info)) |
} else { |
continue; |
for (pno = 0; pno < parts->num_part; pno++) { |
if (!(info.flags & PTI_SEC_CONTAINER)) |
if (!parts->pscheme->get_part_info(parts, pno, |
continue; |
&info)) |
start = info.start; |
continue; |
size = info.size; |
if (!(info.flags & PTI_SEC_CONTAINER)) |
|
continue; |
|
start = info.start; |
|
size = info.size; |
|
} |
|
} |
|
if (size > 0) { |
|
inner_parts = parts->pscheme->secondary_partitions( |
|
parts, start, false); |
|
if (inner_parts != NULL) |
|
parts = inner_parts; |
|
} |
} |
} |
} |
|
|
|
if (size > 0) |
|
return parts->pscheme->secondary_partitions(parts, start, |
|
false); |
|
|
|
return NULL; |
|
} |
|
|
|
bool |
|
install_desc_from_parts(struct install_partition_desc *install, |
|
struct disk_partitions *parts) |
|
{ |
|
struct disk_partitions *inner_parts; |
|
|
|
memset(install, 0, sizeof(*install)); |
|
inner_parts = get_inner_parts(parts); |
|
if (inner_parts != NULL) |
|
parts = inner_parts; |
|
|
return usage_info_list_from_parts(&install->infos, &install->num, |
return usage_info_list_from_parts(&install->infos, &install->num, |
parts); |
parts); |
} |
} |
Line 2065 install_desc_from_parts(struct install_p |
|
Line 2098 install_desc_from_parts(struct install_p |
|
void |
void |
free_usage_set(struct partition_usage_set *wanted) |
free_usage_set(struct partition_usage_set *wanted) |
{ |
{ |
|
/* XXX - free parts? free clone src? */ |
free(wanted->menu_opts); |
free(wanted->menu_opts); |
free(wanted->infos); |
free(wanted->infos); |
} |
} |
Line 2072 free_usage_set(struct partition_usage_se |
|
Line 2106 free_usage_set(struct partition_usage_se |
|
void |
void |
free_install_desc(struct install_partition_desc *install) |
free_install_desc(struct install_partition_desc *install) |
{ |
{ |
|
#ifndef NO_CLONES |
|
size_t i, j; |
|
|
|
for (i = 0; i < install->num; i++) { |
|
struct selected_partitions *src = install->infos[i].clone_src; |
|
if (!(install->infos[i].flags & PUIFLG_CLONE_PARTS) || |
|
src == NULL) |
|
continue; |
|
free_selected_partitions(src); |
|
for (j = i+1; j < install->num; j++) |
|
if (install->infos[j].clone_src == src) |
|
install->infos[j].clone_src = NULL; |
|
} |
|
#endif |
free(install->infos); |
free(install->infos); |
} |
} |
|
|