Пример #1
0
/*
 * Unpacks sets,  clobbering existing contents.
 */
void
do_reinstall_sets(void)
{
    int retcode = 0;

    unwind_mounts();
    msg_display(MSG_reinstallusure);
    if (!ask_noyes(NULL))
        return;

    if (find_disks(msg_string(MSG_reinstall)) < 0)
        return;

    if (mount_disks() != 0)
        return;

    /* Unpack the distribution. */
    process_menu(MENU_distset, &retcode);
    if (retcode == 0)
        return;
    if (get_and_unpack_sets(0, NULL, MSG_unpackcomplete, MSG_abortunpack) != 0)
        return;

    sanity_check();
}
Пример #2
0
void
do_configmenu()
{
	int		menu_no;
	int		opts;
	menu_ent	me[CONFIGOPT_LAST];
	configinfo	*ce[CONFIGOPT_LAST];

        wrefresh(curscr);
        wmove(stdscr, 0, 0);
        wclear(stdscr);
        wrefresh(stdscr);
	
	/* if the target isn't mounted already, figure it out. */
	if (target_mounted() == 0) {
		if (find_disks(msg_string(MSG_configure_prior)) < 0)
			return;

		if (mount_disks() != 0)
			return;
	}

	config_list_init();
	make_url(pkgpath, &pkg, pkg_dir);
	opts = init_config_menu(config_list, me, ce);

	menu_no = new_menu(NULL, me, opts, 0, -4, 0, 70,
		MC_SCROLL | MC_NOBOX | MC_DFLTEXIT,
		configmenu_hdr, set_config, NULL, "XXX Help String",
		MSG_doneconfig);

	process_menu(menu_no, ce);
	free_menu(menu_no);

	sanity_check();

}
Пример #3
0
/*
 * Do the system upgrade.
 */
void
do_upgrade(void)
{
    int retcode = 0;
    partman_go = 0;

    msg_display(MSG_upgradeusure);
    if (!ask_noyes(NULL))
        return;

    get_ramsize();

    if (find_disks(msg_string(MSG_upgrade)) < 0)
        return;

    if (set_swap_if_low_ram(pm->diskdev, NULL) < 0)
        return;

    if (md_pre_update() < 0)
        return;

    if (mount_disks() != 0)
        return;


    /*
     * Save X symlink, ...
     */
    if (save_X("/usr/X11R6"))
        return;
    if (save_X("/usr/X11R7"))
        return;

#ifdef AOUT2ELF
    move_aout_libs();
#endif
    /* Do any md updating of the file systems ... e.g. bootblocks,
       copy file systems ... */
    if (!md_update())
        return;

    wrefresh(curscr);
    wmove(stdscr, 0, 0);
    wclear(stdscr);
    wrefresh(stdscr);

    /* Done with disks. Ready to get and unpack tarballs. */
    process_menu(MENU_distset, &retcode);
    if (retcode == 0)
        return;
    if (get_and_unpack_sets(1, MSG_disksetupdoneupdate,
                            MSG_upgrcomplete, MSG_abortupgr) != 0)
        return;

    if (md_post_extract())
        return;

    merge_X("/usr/X11R6");
    merge_X("/usr/X11R7");

    sanity_check();
}