2006-01-13 01:02:44 +03:00
|
|
|
/* $NetBSD: menus.mi,v 1.23 2006/01/12 22:02:44 dsl Exp $ */
|
2003-05-16 23:15:00 +04:00
|
|
|
|
|
|
|
/*-
|
|
|
|
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
* by David Laight.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by the NetBSD
|
|
|
|
* Foundation, Inc. and its contributors.
|
|
|
|
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Menu system definitions -- machine and language independent
|
|
|
|
*
|
2003-06-27 17:36:04 +04:00
|
|
|
* Some menus may be called directly in the code rather than via the
|
|
|
|
* menu system.
|
|
|
|
*
|
2003-05-16 23:15:00 +04:00
|
|
|
* This file must be first in the sed command line.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
{
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <curses.h>
|
|
|
|
#include "defs.h"
|
|
|
|
#include "md.h"
|
|
|
|
#include "msg_defs.h"
|
|
|
|
#include "menu_defs.h"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
default y=12, no exit, scrollable;
|
|
|
|
|
|
|
|
allow dynamic menus;
|
2003-06-10 21:47:15 +04:00
|
|
|
allow dynamic messages;
|
2003-05-16 23:15:00 +04:00
|
|
|
|
2003-06-11 13:03:32 +04:00
|
|
|
|
2003-11-30 17:36:43 +03:00
|
|
|
menu selfskind, title MSG_Select_the_type, exitstring MSG_unchanged, y=6, x=30;
|
2003-07-27 11:45:08 +04:00
|
|
|
display action {
|
2003-11-30 17:36:43 +03:00
|
|
|
partinfo *p = arg;
|
|
|
|
switch (p->pi_fstype) {
|
2003-07-27 11:45:08 +04:00
|
|
|
case FS_UNUSED: menu->cursel = 0; break;
|
2003-11-30 17:36:43 +03:00
|
|
|
case FS_BSDFFS:
|
|
|
|
menu->cursel = p->pi_flags & PIF_FFSv2 ? 2 : 1;
|
|
|
|
break;
|
|
|
|
case FS_SWAP: menu->cursel = 3; break;
|
|
|
|
case FS_MSDOS: menu->cursel = 4; break;
|
|
|
|
case FS_BSDLFS: menu->cursel = 5; break;
|
|
|
|
default : menu->cursel = 6; break;
|
2003-07-27 11:45:08 +04:00
|
|
|
};
|
|
|
|
};
|
2003-06-11 13:03:32 +04:00
|
|
|
option "unused", exit, action
|
2003-08-05 17:35:26 +04:00
|
|
|
{ memset(arg, 0, sizeof (partinfo)); };
|
2005-01-21 00:59:35 +03:00
|
|
|
option "FFSv1", exit, action { set_ptype(arg, FS_BSDFFS, 0); };
|
|
|
|
option "FFSv2", exit, action { set_ptype(arg, FS_BSDFFS, PIF_FFSv2); };
|
|
|
|
option "swap", exit, action { set_ptype(arg, FS_SWAP, 0); };
|
|
|
|
option "msdos", exit, action { set_ptype(arg, FS_MSDOS, 0); };
|
|
|
|
option "LFS", exit, action { set_ptype(arg, FS_BSDLFS, 0); };
|
2003-07-27 11:45:08 +04:00
|
|
|
option MSG_other_types, action
|
|
|
|
{ extern int all_fstype_menu;
|
|
|
|
m->opts[m->cursel].opt_menu = all_fstype_menu; };
|
2003-06-11 13:03:32 +04:00
|
|
|
|
2003-08-05 17:35:26 +04:00
|
|
|
menu selbsize, title MSG_Select_file_system_block_size, y=10, x=40;
|
|
|
|
display action {
|
|
|
|
partinfo *pi = arg;
|
|
|
|
int b;
|
|
|
|
b = ffs(pi->pi_fsize * pi->pi_frag / 4096) - 1;
|
|
|
|
if (b < 0 || b >= menu->numopts)
|
|
|
|
b = 1;
|
|
|
|
menu->cursel = b;
|
|
|
|
};
|
2003-06-11 13:03:32 +04:00
|
|
|
option "4096", exit, action { set_bsize(arg, 4096); };
|
2003-08-05 17:35:26 +04:00
|
|
|
option "8192", exit, action { set_bsize(arg, 8192); };
|
2003-06-11 13:03:32 +04:00
|
|
|
option "16384", exit, action { set_bsize(arg, 16384); };
|
|
|
|
option "32768", exit, action { set_bsize(arg, 32768); };
|
|
|
|
|
2003-08-05 17:35:26 +04:00
|
|
|
menu selfsize, title MSG_Select_file_system_fragment_size, y=11, x=40;
|
|
|
|
display action {
|
|
|
|
partinfo *pi = arg;
|
|
|
|
int b;
|
|
|
|
b = ffs(pi->pi_fsize / 512) - 1;
|
|
|
|
if (b < 0 || b >= menu->numopts)
|
|
|
|
b = 1;
|
|
|
|
menu->cursel = b;
|
|
|
|
};
|
|
|
|
option "512", exit, action { set_fsize(arg, 512); };
|
|
|
|
option "1024", exit, action { set_fsize(arg, 1024); };
|
|
|
|
option "2048", exit, action { set_fsize(arg, 2048); };
|
|
|
|
option "4096", exit, action { set_fsize(arg, 4096); };
|
|
|
|
option "8192", exit, action { set_fsize(arg, 8192); };
|
|
|
|
option "16384", exit, action { set_fsize(arg, 16384); };
|
|
|
|
option "32768", exit, action { set_fsize(arg, 32768); };
|
|
|
|
|
2003-08-10 18:51:48 +04:00
|
|
|
menu mountoptions, title MSG_toggle, y=5, x=30, exitstring MSG_unchanged;
|
2005-08-27 20:34:15 +04:00
|
|
|
display action {
|
|
|
|
static int actual_numopt;
|
|
|
|
if (!actual_numopt)
|
|
|
|
actual_numopt = menu->numopts;
|
|
|
|
menu->numopts = actual_numopt -
|
|
|
|
(((partinfo *)arg)->pi_fstype != FS_BSDFFS);
|
|
|
|
};
|
2003-08-05 17:35:26 +04:00
|
|
|
option "async", exit, action
|
|
|
|
{ ((partinfo *)arg)->pi_flags ^= PIF_ASYNC; };
|
|
|
|
option "noatime", exit, action
|
|
|
|
{ ((partinfo *)arg)->pi_flags ^= PIF_NOATIME; };
|
2003-08-10 18:51:48 +04:00
|
|
|
option "nodev", exit, action
|
|
|
|
{ ((partinfo *)arg)->pi_flags ^= PIF_NODEV; };
|
2003-08-05 17:35:26 +04:00
|
|
|
option "nodevmtime", exit, action
|
|
|
|
{ ((partinfo *)arg)->pi_flags ^= PIF_NODEVMTIME; };
|
2003-08-10 18:51:48 +04:00
|
|
|
option "noexec", exit, action
|
|
|
|
{ ((partinfo *)arg)->pi_flags ^= PIF_NOEXEC; };
|
|
|
|
option "nosuid", exit, action
|
|
|
|
{ ((partinfo *)arg)->pi_flags ^= PIF_NOSUID; };
|
2003-08-05 17:35:26 +04:00
|
|
|
option "softdep", exit, action
|
|
|
|
{ ((partinfo *)arg)->pi_flags ^= PIF_SOFTDEP; };
|
2003-06-11 13:03:32 +04:00
|
|
|
|
2003-09-27 14:42:16 +04:00
|
|
|
menu netbsd, title MSG_NetBSD_VERSION_Install_System, y=-1,
|
2003-06-27 17:36:04 +04:00
|
|
|
exit, exitstring MSG_Exit_Install_System;
|
|
|
|
display action { toplevel(); };
|
|
|
|
option MSG_Install_NetBSD_to_hard_disk,
|
|
|
|
action { do_install(); };
|
|
|
|
option MSG_Upgrade_NetBSD_on_a_hard_disk,
|
|
|
|
action { do_upgrade(); };
|
|
|
|
option MSG_Re_install_sets_or_install_additional_sets,
|
|
|
|
action { do_reinstall_sets(); };
|
|
|
|
option MSG_Reboot_the_computer, exit,
|
|
|
|
action (endwin) { system("/sbin/reboot -q"); };
|
|
|
|
option MSG_Utility_menu, sub menu utility;
|
|
|
|
|
|
|
|
menu utility, title MSG_NetBSD_VERSION_Utilities, exit;
|
|
|
|
option MSG_Run_bin_sh,
|
|
|
|
action (endwin) { system("/bin/sh"); };
|
|
|
|
option MSG_Set_timezone,
|
2003-07-14 14:53:42 +04:00
|
|
|
action { set_timezone(); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Configure_network,
|
|
|
|
action {
|
|
|
|
extern int network_up;
|
|
|
|
|
|
|
|
network_up = 0;
|
|
|
|
config_network();
|
|
|
|
};
|
|
|
|
/* option MSG_Partition a disk; XXX add later. */
|
|
|
|
option MSG_Logging_functions, action { do_logging(); };
|
|
|
|
option MSG_Halt_the_system, exit,
|
|
|
|
action (endwin) { system("/sbin/halt -q"); };
|
|
|
|
|
2004-03-01 02:25:09 +03:00
|
|
|
menu yesno, y=-10;
|
2003-11-30 17:36:43 +03:00
|
|
|
display action { menu->title = arg ? arg : MSG_yes_or_no; };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Yes, exit, action {yesno = 1;};
|
|
|
|
option MSG_No, exit, action {yesno = 0;};
|
|
|
|
|
2004-03-01 02:25:09 +03:00
|
|
|
menu noyes, y=-10;
|
2003-11-30 17:36:43 +03:00
|
|
|
display action { menu->title = arg ? arg : MSG_yes_or_no; };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_No, exit, action {yesno = 0;};
|
|
|
|
option MSG_Yes, exit, action {yesno = 1;};
|
|
|
|
|
2004-03-01 02:25:09 +03:00
|
|
|
menu ok, no shortcut, y=-10;
|
2003-11-30 17:36:43 +03:00
|
|
|
display action { menu->title = arg; };
|
|
|
|
option MSG_Hit_enter_to_continue, exit;
|
2003-06-27 17:36:04 +04:00
|
|
|
|
2004-08-14 20:06:36 +04:00
|
|
|
menu layout, sub menu, y=-1, title MSG_Choose_your_installation;
|
2003-07-27 11:45:08 +04:00
|
|
|
option MSG_Set_Sizes, exit, action { layoutkind = 1; };
|
2003-07-14 14:53:42 +04:00
|
|
|
option MSG_Use_Existing, exit, action { layoutkind = 4; };
|
2003-06-27 17:36:04 +04:00
|
|
|
|
2004-08-14 20:06:36 +04:00
|
|
|
menu sizechoice, sub menu, y=0, title MSG_Choose_your_size_specifier;
|
2003-07-27 11:45:08 +04:00
|
|
|
display action {
|
|
|
|
if (sizemult == current_cylsize)
|
|
|
|
menu->cursel = 1;
|
|
|
|
else if (sizemult == 1)
|
|
|
|
menu->cursel = 2;
|
|
|
|
};
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Megabytes, exit, action
|
|
|
|
{ sizemult = MEG / sectorsize;
|
|
|
|
multname = msg_string(MSG_megname);
|
|
|
|
};
|
|
|
|
option MSG_Cylinders, exit, action
|
|
|
|
{ sizemult = current_cylsize;
|
|
|
|
multname = msg_string(MSG_cylname);
|
|
|
|
};
|
|
|
|
option MSG_Sectors, exit, action
|
|
|
|
{ sizemult = 1;
|
|
|
|
multname = msg_string(MSG_secname);
|
|
|
|
};
|
|
|
|
|
2006-01-13 01:02:44 +03:00
|
|
|
menu distmedium, title MSG_Select_medium, y=-1;
|
2003-10-20 00:17:31 +04:00
|
|
|
display action { umount_mnt2(); msg_display(MSG_distmedium); };
|
|
|
|
option MSG_cdrom, exit, action { *(int *)arg = get_via_cdrom(); };
|
2004-11-12 00:24:40 +03:00
|
|
|
option MSG_ftp, exit, action { *(int *)arg = get_via_ftp("ftp"); };
|
|
|
|
option MSG_http, exit, action { *(int *)arg = get_via_ftp("http"); };
|
|
|
|
option MSG_nfs, exit, action { *(int *)arg = get_via_nfs(); };
|
2003-10-20 00:17:31 +04:00
|
|
|
option MSG_floppy, exit, action { *(int *)arg = get_via_floppy(); };
|
|
|
|
option MSG_local_fs, exit, action { *(int *)arg = get_via_localfs(); };
|
|
|
|
option MSG_local_dir, exit, action { *(int *)arg = get_via_localdir();};
|
2006-01-13 01:02:44 +03:00
|
|
|
option MSG_Skip_set, exit, action { *(int *)arg = SET_SKIP; };
|
|
|
|
option MSG_Skip_group,exit, action { *(int *)arg = SET_SKIP_GROUP; };
|
|
|
|
option MSG_Abandon, exit, action { *(int *)arg = SET_ABANDON; };
|
2003-06-27 17:36:04 +04:00
|
|
|
|
|
|
|
menu distset, title MSG_Select_your_distribution;
|
|
|
|
display action { msg_display (MSG_distset); };
|
|
|
|
option MSG_Full_installation, exit;
|
|
|
|
option MSG_Custom_installation, exit, action { customise_sets(); };
|
|
|
|
|
|
|
|
menu ftpsource, title MSG_Change;
|
2003-07-14 14:53:42 +04:00
|
|
|
display action {
|
|
|
|
msg_clear();
|
2006-01-13 01:02:44 +03:00
|
|
|
msg_table_add(MSG_ftpsource, arg, ftp.host, ftp.dir, set_dir,
|
|
|
|
ftp.user, strcmp(ftp.user, "ftp") == 0 || ftp.pass[0] == 0
|
|
|
|
? ftp.pass : msg_string(MSG_hidden),
|
|
|
|
ftp.proxy, xfer_dir);
|
2003-06-27 17:36:04 +04:00
|
|
|
};
|
|
|
|
option MSG_Host, action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_prompt_win(MSG_Host, -1, 12, 0, 0,
|
2006-01-13 01:02:44 +03:00
|
|
|
ftp.host, ftp.host, sizeof ftp.host); };
|
2004-06-06 01:18:59 +04:00
|
|
|
option MSG_Base_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Base_dir, -1, 12, 0, 0,
|
2006-01-13 01:02:44 +03:00
|
|
|
ftp.dir, ftp.dir, sizeof ftp.dir); };
|
2004-06-06 01:18:59 +04:00
|
|
|
option MSG_Set_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Set_dir, -1, 12, 0, 0,
|
|
|
|
set_dir, set_dir, sizeof set_dir); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_User, action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_prompt_win(MSG_User, -1, 12, 0, 0,
|
2006-01-13 01:02:44 +03:00
|
|
|
ftp.user, ftp.user, sizeof ftp.user);
|
|
|
|
ftp.pass[0] = 0;
|
2003-06-27 17:36:04 +04:00
|
|
|
};
|
|
|
|
option MSG_Password, action
|
2006-01-13 01:02:44 +03:00
|
|
|
{ if (strcmp(ftp.user, "ftp") == 0)
|
2004-06-06 01:18:59 +04:00
|
|
|
msg_prompt_win(MSG_email, -1, 12, 0, 0,
|
2006-01-13 01:02:44 +03:00
|
|
|
ftp.pass, ftp.pass, sizeof ftp.pass);
|
2003-06-27 17:36:04 +04:00
|
|
|
else {
|
2004-06-06 01:18:59 +04:00
|
|
|
msg_prompt_noecho(MSG_Password, "",
|
2006-01-13 01:02:44 +03:00
|
|
|
ftp.pass, sizeof ftp.pass);
|
2003-06-27 17:36:04 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
option MSG_Proxy, action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_prompt_win(MSG_Proxy, -1, 12, 0, 0,
|
2006-01-13 01:02:44 +03:00
|
|
|
ftp.proxy, ftp.proxy, sizeof ftp.proxy);
|
|
|
|
if (strcmp(ftp.proxy, "") == 0) {
|
2003-06-27 17:36:04 +04:00
|
|
|
unsetenv("ftp_proxy");
|
2004-11-12 00:24:40 +03:00
|
|
|
unsetenv("http_proxy");
|
|
|
|
} else {
|
2006-01-13 01:02:44 +03:00
|
|
|
setenv("ftp_proxy", ftp.proxy, 1);
|
|
|
|
setenv("http_proxy", ftp.proxy, 1);
|
2004-11-12 00:24:40 +03:00
|
|
|
}
|
2003-06-27 17:36:04 +04:00
|
|
|
};
|
2006-01-13 01:02:44 +03:00
|
|
|
option MSG_Xfer_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Xfer_dir, -1, 12, 0, 0,
|
|
|
|
xfer_dir, xfer_dir, sizeof xfer_dir); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Get_Distribution, exit;
|
|
|
|
|
|
|
|
menu nfssource, title MSG_Change;
|
|
|
|
display action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_display(MSG_nfssource, nfs_host, nfs_dir, set_dir); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Host, action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_prompt_win(MSG_Host, -1, 12, 0, 0,
|
|
|
|
nfs_host, nfs_host, sizeof nfs_host); };
|
|
|
|
option MSG_Base_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Base_dir, -1, 12, 0, 0,
|
|
|
|
nfs_dir, nfs_dir, sizeof nfs_dir); };
|
|
|
|
option MSG_Set_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Set_dir, -1, 12, 0, 0,
|
|
|
|
set_dir, set_dir, sizeof set_dir); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Continue, exit;
|
|
|
|
|
|
|
|
menu fdremount, title MSG_What_do_you_want_to_do;
|
2006-01-13 01:02:44 +03:00
|
|
|
option MSG_Try_again, exit, action { *(int *)arg = SET_CONTINUE; };
|
|
|
|
option MSG_Set_finished, exit, action { *(int *)arg = SET_OK; };
|
|
|
|
option MSG_Abort_install, exit, action { *(int *)arg = SET_RETRY; };
|
2003-06-27 17:36:04 +04:00
|
|
|
|
2006-01-13 01:02:44 +03:00
|
|
|
menu fdok, title MSG_What_do_you_want_to_do;
|
|
|
|
option MSG_OK, exit, action { *(int *)arg = SET_CONTINUE; };
|
|
|
|
option MSG_Set_finished, exit, action { *(int *)arg = SET_OK; };
|
|
|
|
option MSG_Abort_install, exit, action { *(int *)arg = SET_RETRY; };
|
2003-06-27 17:36:04 +04:00
|
|
|
|
|
|
|
menu crypttype, title MSG_Password_cipher, y=16;
|
|
|
|
option MSG_DES, exit, action { yesno = 1; };
|
|
|
|
option MSG_MD5, exit, action { yesno = 2; };
|
|
|
|
option MSG_Blowfish_2_7_round, exit, action { yesno = 3; };
|
|
|
|
option MSG_do_not_change, exit, action { yesno = 0; };
|
|
|
|
|
|
|
|
menu cdromsource, title MSG_Change;
|
|
|
|
display action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_display(MSG_cdromsource, cdrom_dev, set_dir); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Device, action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_prompt_win(MSG_dev, -1, 12, 0, 0,
|
|
|
|
cdrom_dev, cdrom_dev, sizeof cdrom_dev); };
|
|
|
|
option MSG_Set_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Set_dir, -1, 12, 0, 0,
|
|
|
|
set_dir, set_dir, sizeof set_dir); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Continue, exit;
|
|
|
|
|
|
|
|
menu localfssource, title MSG_Change;
|
|
|
|
display action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_display(MSG_localfssource, localfs_dev, localfs_fs,
|
|
|
|
localfs_dir, set_dir); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Device, action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_prompt_win(MSG_dev, -1, 12, 0, 0,
|
|
|
|
localfs_dev, localfs_dev, sizeof localfs_dev);};
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_File_system, action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_prompt_win(MSG_filesys, -1, 12, 0, 0,
|
|
|
|
localfs_fs, localfs_fs, sizeof localfs_fs); };
|
|
|
|
option MSG_Base_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Base_dir, -1, 12, 0, 0,
|
|
|
|
localfs_dir, localfs_dir, sizeof localfs_dir);};
|
|
|
|
option MSG_Set_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Set_dir, -1, 12, 0, 0,
|
|
|
|
set_dir, set_dir, sizeof set_dir); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Continue, exit;
|
|
|
|
|
|
|
|
menu localdirsource, title MSG_Change;
|
|
|
|
display action
|
2004-06-06 01:18:59 +04:00
|
|
|
{ msg_display(MSG_localdir, localfs_dir, set_dir); };
|
|
|
|
option MSG_Base_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Base_dir, -1, 12, 0, 0, localfs_dir, localfs_dir, 60); };
|
|
|
|
option MSG_Set_dir, action
|
|
|
|
{ msg_prompt_win(MSG_Set_dir, -1, 12, 0, 0, set_dir, set_dir, 60); };
|
2003-06-27 17:36:04 +04:00
|
|
|
option MSG_Continue, exit;
|
|
|
|
|
|
|
|
menu namesrv6, title MSG_Select_IPv6_DNS_server;
|
|
|
|
option "ns9.iij.ad.jp", exit, action
|
|
|
|
{
|
|
|
|
#ifdef INET6
|
|
|
|
strlcpy(net_namesvr6, "2001:240::1", sizeof(net_namesvr6));
|
|
|
|
yesno = 1;
|
|
|
|
#else
|
|
|
|
yesno = 0;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
option "ns-wide.wide.ad.jp", exit, action
|
|
|
|
{
|
|
|
|
#ifdef INET6
|
|
|
|
strlcpy(net_namesvr6, "2001:200:0:1::3", sizeof(net_namesvr6));
|
|
|
|
yesno = 1;
|
|
|
|
#else
|
|
|
|
yesno = 0;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
option "light.imasy.or.jp", exit, action
|
|
|
|
{
|
|
|
|
#ifdef INET6
|
|
|
|
strlcpy(net_namesvr6, "3ffe:505:0:1:2a0:c9ff:fe61:6521",
|
|
|
|
sizeof(net_namesvr6));
|
|
|
|
yesno = 1;
|
|
|
|
#else
|
|
|
|
yesno = 0;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
option MSG_other, exit, action
|
|
|
|
{ yesno = 0; };
|
|
|
|
|
|
|
|
menu rootsh, title MSG_Root_shell;
|
2005-02-20 23:54:52 +03:00
|
|
|
option "/bin/sh", exit, action {*(const char **)arg = "/bin/sh";};
|
|
|
|
option "/bin/ksh", exit, action {*(const char **)arg = "/bin/ksh";};
|
|
|
|
option "/bin/csh", exit, action {*(const char **)arg = "/bin/csh";};
|
2003-06-27 17:36:04 +04:00
|
|
|
|
|
|
|
menu extract, title MSG_Select_set_extraction_verbosity;
|
2004-06-06 01:18:59 +04:00
|
|
|
display action { menu->cursel = *(int *)arg; };
|
|
|
|
option MSG_Progress_bar, exit, action { *(int *)arg = 0; };
|
|
|
|
option MSG_Silent, exit, action { *(int *)arg = 1; };
|
|
|
|
option MSG_Verbose, exit, action { *(int *)arg = 2; };
|