DragonFly bugs List (threaded) for 2005-02
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: installer networking
On Tue, Feb 01, 2005 at 01:09:39AM -0800, Chris Pressey wrote:
>On Tue, 1 Feb 2005 00:43:06 -0500
>"George Georgalis" <george@xxxxxxxxx> wrote:
>
>> On Mon, Jan 31, 2005 at 08:57:08PM -0800, Chris Pressey wrote:
>> >On Mon, 31 Jan 2005 19:08:55 -0500
>> >"George Georgalis" <george@xxxxxxxxx> wrote:
>> >
>> >> Is it intentional that the installer (20040913) refuses to
>> >configure a > network interface for a network that is not immediately
>> >available? I > found it a bit awkward to setup an interface with
>> >dhcp, only to change > it back when the box left my bench and went to
>> >the internet.
>> >
>> >Not "intentional" so much as it's the typical use case we've been
>> >assuming - the network configuration you set up during install is
>> >likely the same network configuration you want to use when you boot
>> >the box, at least for the first time. As with several situations
>> >with the current installer, exceptions must be handled manually
>> >(mount the target system yourself, edit /mnt/etc/rc.conf, etc)
>> >Version 2 will handle network configuration in a more sophisticated
>> >manner, we hope. That's still a fair ways off, though.
>>
>> If you can tell me the file to patch, I'll try to come up with a
>> temporary fix, ie "that network unavailable, are you sure (y/N)" It
>> would be convenient for people who haven't memorized rc.conf syntax
>> (me). But if that option is tricky, I can live without it.
>
>You can look at function fn_assign_ip() in fn_configure.c:
>
>http://www.bsdinstaller.org/cgi-bin/cvsweb.cgi/installer/src/backend/installer/fn_configure.c
>
>But, by the looks of the code, it actually does write your selected
>network settings to rc.conf, even if they failed to connect. Possibly
>all that is needed is a more informative error message.
I can try it again later today, but what I think what is happening
is the inform function causes a break from
if (dfui_id_is(dfui_response_get_action_id(r), "ok"))
(about 22 lines above) and subsequent config_var_set doesn't happen.
I couldn't find where inform is defined though.
from fn_configure_20040910.c (looks the same as 20050129 here)
cmds = commands_new();
command_add(cmds, "%s%s %s %s netmask %s",
a->os_root, cmd_name(a, "IFCONFIG"),
interface, interface_ip, interface_netmask);
command_add(cmds, "%s%s add default %s",
a->os_root, cmd_name(a, "ROUTE"),
defaultrouter);
if (commands_execute(a, cmds)) {
/* XXX sleep(3); */
show_ifconfig(a->c, interface);
} else {
inform(a->c, "Warning: could not assign IP or default gateway.");
}
commands_free(cmds);
asprintf(&string, "ifconfig_%s", interface);
asprintf(&string1, "inet %s netmask %s",
interface_ip, interface_netmask);
config_var_set(rc_conf, string, string1);
config_var_set(rc_conf, "defaultrouter", defaultrouter);
I'm accustomed to seeing "skip cancel ignore retry" options (don't
actually recalll what the 4 choices are) but if one of the options
allowed the static IP to go in rc.conf, I missed it. Could it be that
inform needs non-fatal exit codes (and probably more work than worth)?
// George
. ...
"Note: root's new password will appear in the install log. "
is this really necessary?
--
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george@xxxxxxxxx
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]