Re: sysinst with dhcp: host-name option
Mikolaj Golub <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.installation |
|---|---|
| Organization | INEC |
| Message-ID | <[email protected]> |
On Tue, 27 Mar 2007 07:52:37 +0100 David Laight wrote:
DL> We either need to ask:
DL> "Do you want to save the config used during the install ?"
DL> or:
DL> "Do you want to setup the network parameters and save the values ?"
DL> So the user never sees both questions.
What to do, when the answer is negative for the first question? Skip network
configuration at all and save nothing or go to network configuration menu?
Below the patch for the second case, but it can be easily modified for the
first one (just return from mnt_net_config() in case of negative answer).
As for me, any solution would be good :-).
diff -urp src/distrib/utils/sysinst.ORIG/msg.mi.de src/distrib/utils/sysinst/msg.mi.de
--- src/distrib/utils/sysinst.ORIG/msg.mi.de 2007-03-27 12:44:12.000000000 +0300
+++ src/distrib/utils/sysinst/msg.mi.de 2007-03-27 12:54:07.000000000 +0300
@@ -757,10 +757,13 @@ abbrechen.
}
.endif
-message mntnetconfig
+message mntnetconfigsave
{Möchten Sie die aktuellen Netzwerkeinstellungen für den allgemeinen
Gebrauch in /etc speichern?}
+message mntnetconfigsetup
+{XXXDo you want to setup the network parameters and save the values? }
+
message cur_distsets
{Die folgenden Distributionspakete werden verwendet:
diff -urp src/distrib/utils/sysinst.ORIG/msg.mi.en src/distrib/utils/sysinst/msg.mi.en
--- src/distrib/utils/sysinst.ORIG/msg.mi.en 2007-03-27 12:44:12.000000000 +0300
+++ src/distrib/utils/sysinst/msg.mi.en 2007-03-27 12:53:14.000000000 +0300
@@ -703,10 +703,13 @@ If the set's has no more disks, select "
Select "Abort fetch" to return to the install media selection menu.
}
-message mntnetconfig
+message mntnetconfigsave
{Is the network information you entered accurate for this machine
in regular operation and do you want it installed in /etc? }
+message mntnetconfigsetup
+{Do you want to setup the network parameters and save the values? }
+
message cur_distsets
{The following is the list of distribution sets that will be used.
diff -urp src/distrib/utils/sysinst.ORIG/msg.mi.es src/distrib/utils/sysinst/msg.mi.es
--- src/distrib/utils/sysinst.ORIG/msg.mi.es 2007-03-27 12:44:12.000000000 +0300
+++ src/distrib/utils/sysinst/msg.mi.es 2007-03-27 12:55:01.000000000 +0300
@@ -724,10 +724,13 @@ para instalarlo. Seleccione "Abortar lec
de selección de medios de instalación.
}
-message mntnetconfig
+message mntnetconfigsave
{La información de red que ha introducido, ¿es la adecuada para el
funcionamiento normal de esta máquina y desea instalarla en /etc? }
+message mntnetconfigsetup
+{XXXDo you want to setup the network parameters and save the values? }
+
message cur_distsets
{Ésta es la lista de conjuntos de distribución que se usará.
diff -urp src/distrib/utils/sysinst.ORIG/msg.mi.fr src/distrib/utils/sysinst/msg.mi.fr
--- src/distrib/utils/sysinst.ORIG/msg.mi.fr 2007-03-27 12:44:12.000000000 +0300
+++ src/distrib/utils/sysinst/msg.mi.fr 2007-03-27 12:55:51.000000000 +0300
@@ -769,12 +769,15 @@ Sélectionnez "Annuler la récupération" p
de sélection du média d'installation.
}
-message mntnetconfig
+message mntnetconfigsave
{
Souhaitez-vous conserver les réglages réseaux après le redémarrage
du système que nous venons d'installer ?
}
+message mntnetconfigsetup
+{XXXDo you want to setup the network parameters and save the values? }
+
message cur_distsets
{
Veuillez trouver ci-dessous la liste des composants disponibles :
diff -urp src/distrib/utils/sysinst.ORIG/msg.mi.pl src/distrib/utils/sysinst/msg.mi.pl
--- src/distrib/utils/sysinst.ORIG/msg.mi.pl 2007-03-27 12:44:12.000000000 +0300
+++ src/distrib/utils/sysinst/msg.mi.pl 2007-03-27 13:02:32.000000000 +0300
@@ -697,10 +697,13 @@ aby rozpoczac proces jego instalacji. Wy
zeby wybrac inne zrodlo oprogramowania.
}
-message mntnetconfig
+message mntnetconfigsave
{Czy informacje o sieci, ktore podales sa prawidlowe dla tej maszyny
w reguralnej pracy i czy chcesz aby je zapisac w /etc? }
+message mntnetconfigsetup
+{Czy chcesz skonfigurowac siec i zapisac podane ustawienia? }
+
message cur_distsets
{Ponizej jest lista pakietow dystrybucyjnych, ktore zostana uzyte.
diff -urp src/distrib/utils/sysinst.ORIG/net.c src/distrib/utils/sysinst/net.c
--- src/distrib/utils/sysinst.ORIG/net.c 2007-03-27 12:47:25.000000000 +0300
+++ src/distrib/utils/sysinst/net.c 2007-03-27 14:47:16.000000000 +0300
@@ -1015,11 +1015,19 @@ mnt_net_config(void)
char ifconfig_fn[STRSIZE];
FILE *ifconf = NULL;
+ if (network_up) {
+ process_menu(MENU_yesno, deconst(MSG_mntnetconfigsave));
+ if (!yesno)
+ network_up = 0;
+ config_network();
+ } else {
+ process_menu(MENU_yesno, deconst(MSG_mntnetconfigsetup));
+ if (yesno)
+ config_network();
+ }
+
if (!network_up)
return;
- process_menu(MENU_yesno, deconst(MSG_mntnetconfig));
- if (!yesno)
- return;
/* Write hostname to /etc/rc.conf */
if ((net_dhcpconf & DHCPCONF_HOST) == 0)
--
to my, trociny