Commit Graph

76 Commits

Author SHA1 Message Date
mrg c0099774ec allow the user to continue the install, even if sysinst thinks that the
network has not been configured (due to what ever local condition that
causes ping to fail, or whatever.)  requested by kre in private email
many many months ago.
2002-02-04 14:35:10 +00:00
mrg 79ba24e616 wait a couple of seconds for the interface to go live, before calling ping.
fixes problem noted by gkm@petting-zoo.net where the interface was still
negotiating before ping failed, causing the network config to wrongly failed.
2001-06-07 12:34:55 +00:00
itojun d9bcf0f87a use "!rtsol" for IPv6 interface autoconf.
XXX i did not use "!rtsol $int" because there could be problem with
shell script expansion ($int gets expanded too early).
2001-05-07 11:49:52 +00:00
fvdl 58dc4d0703 Use the -2 option for the NFS mount. Install kernels might have
NFS_V2_ONLY to save space, and we're only reading anyway.
2001-04-29 00:22:34 +00:00
itojun 4a360e2310 write out IPv6 configuration to /etc/rc.conf and /etc/ifconfig.* 2001-04-15 11:08:51 +00:00
dogcow 84e3a863c2 missed a \n after dhclient_flags=\"%s\". 2001-03-06 09:22:40 +00:00
mrg d436dd6641 extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes.  details:

- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap.  a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing.  this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'.  create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.


[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB.  as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 02:38:13 +00:00
jdc 6b6028160d Use wrefresh(curscr) instead of clearok().
Suggested by Thomas Dickey.
2001-01-07 13:07:57 +00:00
jdc 885c8eaa06 Be paranoid and do a clearok() before we do a refresh(). 2000-12-31 13:08:05 +00:00
mrg 8da46e6897 de-__P()-ify 2000-12-22 10:12:12 +00:00
jdc dab8e56b56 Don't output the termcap `cl' sequence.
XXX: do we really need to home the cursor here?
XXX: should we do clearok() instead or in addition?
2000-12-21 21:42:00 +00:00
jmc 927b45cf65 After confirming the network setup should be saved, make sure dhcp is enabled if it was used on install 2000-12-17 22:55:53 +00:00
fvdl 30b8888d4a * Change the interface of run_prog: use a flags argument instead of
seperate booleans. Add flags to run as a plain 'system()' command,
  fullscreen (but on a pty), and chrooted, and implement their
  functionality. Add a bit of TIOCPKT handling code to handle
  programs messing with term settings better.
* Ask to set the root password at the end of an install.
* Remove a few unneeded comments.
* Sprinkle some touchwin() calls here and there to make the output cleaner.
  They shouldn't really be needed, but even normal usage (no syslog
  messages) even left the screen messy sometimes.
* Change some messages around that were apparently swapped by accident and
  thus caused confusion.
2000-10-11 23:47:55 +00:00
fvdl 40cd491caa Don't call test(1) to determine the existence/type of files, that's
rather over the top. Not doing this also means that test(1) can
be omitted from the ramdisks (for scripts it's not needed, because it
is built in to sh(1)).
2000-09-26 13:26:02 +00:00
hubertf d2c5531d61 Remove some stale debug code, OK'd by itojun 2000-09-20 21:28:51 +00:00
itojun 738859d74e do not skip IPv6 configuration menu on dhcp configuration.
do not save address/netmask/default router, if we got them from dhcp.
(we shouldn't do that).  if we keep any of dhcp config into /etc, we shoul
update rc.conf to run dhcp again.
2000-07-24 10:52:28 +00:00
itojun 006f0a5618 run IPv6 configuration even if we use dhcp. background:
- on a IPv6/v4 dual stack network, it makes more sense to configure both.
- also, many of IPv4/v6 dual stack network requires us to contacd DNS
  over IPv4 transport.
discussed with cyber@netbsd.org.
2000-07-24 06:05:51 +00:00
itojun 2d3b669a75 ping ff02::2 instead of ff02::9. ff02::9 indicates RIPng capable interface,
which does not necessarily visible.  ff02::2 indicates routers.
2000-07-02 15:07:52 +00:00
cyber cbefbdefce dhclient support added
only invoked if dhclient is present on install image
2000-06-18 23:50:02 +00:00
itojun 524c5db85b fix non-inet6 compilation 2000-01-05 01:50:45 +00:00
itojun 1c5b5f62fc enable IPv6 support in sysinst. integration of work by ichiro@ichiro.org.
- IPv6 autoconfiguration
- IPv6 nameserver
TODO: french messages, dhcp

add -DINET6 into x_ifconfig.
2000-01-04 08:33:51 +00:00
he 05bfcdfbf4 No longer any point in inserting "lookup files bind"
in resolv.conf; after nsswitch implementation in libc
this will be inored here.
1999-10-29 19:45:20 +00:00
mycroft 6cbab8a473 Add `gif' and `faith' to the ignored pseudo-devices. 1999-09-05 16:33:03 +00:00
cgd 6b37daf0b6 From Alan Barrett <apb@iafrica.com>, in response to my response to his PR:
>Removing leading slashes in the url_encode() function is bad, because
>they might be part of a password, but somebody else had apparently made
>url_encode() do that.  Here's a patch that stops url_encode() from
>removing leading slashes, changes the encode_leading_slash code to
>fit in with that policy, adds some comments that should dissuade folk
>from removing leading slashes in the future, and fixes a bug where the
>encode_leading_slash code was not decrementing len.
1999-07-03 09:02:23 +00:00
cgd 026efaa662 replace "/sbin/ping -c 2 %s" with "/sbin/ping -v -c 5 -w 5 -o -n %s".
Shouldn't bother doing DNS lookups or wait a really long time,
should display verbose output and quit after the host has been
successfully pinged even once.  count bumped up to 5 to give boards
which take a while to do media autoselection time to do their thing.
1999-06-24 00:16:49 +00:00
cgd 834b871ea5 don't make /etc/hosts's contents a message. there's no point and it
makes some things harder, for instance... Deal correctly with the case
where the user-supplied hostname is already fully qualified with the
domain name they supplied.  Addresses PR#6955.
1999-06-23 22:55:14 +00:00
cgd 491d56190d address the problems described in PR#7833 and its followups: ftp/nfs
installation would try to continue even if no networking interfaces found,
and, and, when that was fixed, instead of dropping back to the
pick-distribution-medium menu they'd drop all the way back to the opening
menu.
1999-06-22 18:47:07 +00:00
cgd 59d3c08e03 mark all calls to write 'CL' (the screen-clear escape sequence) to the
screen as XXX.  Where they were not followed by wclear(stdscr), add
wclear(stdscr).  Somebody was let out without adult supervision.  If i
were more adventurous, i'd remove the bits that output 'CL', but i'm not
gonna go there right now.
1999-06-22 00:57:06 +00:00
cgd 45a8fa11cd reimplement most of get_ifconfig_info() so that it only ignores network
pseudo-devices.  This is done by explicitly listing the driver names
(e.g. "lo") to ignore in an array in this file.  Right now, "eon", "gre",
"ipip", "lo", "nsip", "ppp", "sl", "strip", and "tun" are ignored.
1999-06-20 07:55:00 +00:00
cgd a1d9660ade typos noticed in PR#7248 1999-06-20 06:42:05 +00:00
cgd a640bc7014 copyright notice typo fixups, as noticed in PR#7248. This software
was developed, not develooped.
1999-06-20 06:08:13 +00:00
cgd 5e4db63c27 * when encoding an FTP url, if the path starts with a / put a %2F at the
start of the URL so that the request will start from / (rather than
  relative to the login directory; makes things work better for
  non-anonymous FTP).  To make it clearer what's going on, make the
  default path (used to get distribution bits) relative.  (according
  to the 1.4 LAST_MINUTE file, this is OK.)
* Also, %-encode passwords in FTP URLs (doesn't help actual security, but
  makes it slightly harder to figure out a password by reading over
  somebody's shoulder).
1999-06-18 23:26:40 +00:00
bouyer 8d7cb08335 Main change: add a cleanup_dist() function in util.c which will do the needed
cleanups before extracting a set. Should'nt do anything for an install,
as the filesystem shouldn't contain files that need to be removed.
cleanup_dist() is called before extract_file() for each set (the set name
is passed as parameter). It will open a file /dist/<set name>_obsolete
if it exists. This file should contain a list of files (absolutes
pathnames) that needs to be removed. cleanup_dist() will lstat() each file
to determine if it's there and if it's a directory or not.
It will then unlink() entries that are not directories and then rmdir()
directories. If a directory is not empty (it should now if the list of files
is correct) it will be renamed to <directory.old> and the user will be warned.

Other changes:
- move prototype of target_prefix() in defs.h, don't maintain a copy
  of it in each file.
- in install.c, after MSG_disksetupdone, do a wclear(stdscr) (display was
  clobbered after it).
- kill MSG_openmsgbuf, it's not used anywhere
- after MSG_disksetupdone in upgrade, don't call MENU_ok, do it the
  same way as in install.
- add wclear(stdscr);/wrefresh(stdscr); before calling MENU_distset (another
  display problem ...)
- While I'm there, move ask_verbose_dist() before MENU_distmedium. This way,
  if all go well the user can go away one ftp starts and come back once
  sets are extracted.
1999-04-13 20:17:47 +00:00
bouyer 5c7e21f9cb - Add a message explaining the user how to specify units for inputs
- in run_prog(), do an explicit wclear(stdscr); wrefresh(stdscr);
  before launching subwindows. This seems to solve all the display
  problems associated with run_prog().
1999-04-13 14:49:56 +00:00
bouyer be743ed36b - Add 2 functions in label.c, getpartoff()/getpartsize() used to let the user
enter partitions offet and size. The user can chose unit independantly of
  the unit used for display ('M'/'c'/'s'). These functions do the proper
  bound checks and alignement/roudups. Used in the edfspart menu and
  i386 md_make_bsd_partitions() (other ports should do the change as
  well).
- now that getpartsize() does the rigth thing, kill the swapadj hack (which was
  buggy anyway).
- in i386 md_make_bsd_partitions(), don't propose defaults that don't fit on
  the disk. If the disk is too small, fallback to custom instead.
- fix a bug in mbr.c, where the partition flags would not have always been
  reset. sysinst created me a MBR with 2 active partition. The boot code
  doesn't like it :)
- added a message for eventual mount failures.
- killed donewfs and extracting messages, as we run  the commands in a
  subwindow these messages just flashed on the screen.
- Changes a few exit(1) to return(1), to give the user a second chance.
- added msg_clear() or wclear(stdscr) in a place or two, to make
  display a bit nicer.
- in run_cmd(), if the command succeeded, don't wait for the user to
  press enter.
1999-04-11 22:40:19 +00:00
bouyer 04f9354ab3 Some fixes for the do_install() function:
- Make all the functions called from do_install() return an error code,
  so that we can abort install if something went wrong.
- Add a 'errstr' argument to run_prog(), which if not NULL is displayed
  with msg_printf() and followed by process_menu(MENU_ok) if the command fail.
  Used to warn the user that the current action is aborted.
- in a few places use msg_display() or msg_printf() rather than printf.
  It seems that stdout/stderr are not always pointing to the active curses
  window.
- garbage-collecd unused messages, add a few new one (error handling).
XXX only tested on i386. Other md parts should be tested as well.
1999-04-09 10:24:38 +00:00
simonb 1c15941926 Remove any leading '/'s in the pathname component of the FTP URL.
When the complete URL is constructed, and '/' is inserted between
the hostname and the pathname components.
1999-04-07 13:09:55 +00:00
simonb f04624dfbf Remove single quotes from the ftp URL and remove the comment about
"protecting the URL from the shell."  run_prog() now breaks up it's
argument and calls execvp() directly, so there's no shell to be wary
off...
1999-04-07 05:18:49 +00:00
perry 0547e6d3b2 URLs can't safely contain certain characters unless they are %XX hex
encoded. This means certain passwords, usernames, etc., will not work
with "ftp ftp://...."

This code, submitted by Alan Barrett <apb@iafrica.com>, fixes this by
hex encoding unsafe strings in a clean fashion. This should close a
couple of outstanding PRs. Thanks Alan!
1999-03-19 14:49:07 +00:00
garbled 851ee9e397 1) Remove all vestiges of tar from src/distrib. Use pax and appropriate
commandlines for all tar operations.  (work supplied by Matt Green)
2) Update arch/*/md.c to deal with new sysinst/run.c.  Special case
anything that needs to do a redirect or a pipe.
3) #if 0 some unused code in target.c. This code will need to be updated,
or special cased with do_system.

Big thank you to Matt for all his work on this.
1999-01-25 23:34:20 +00:00
garbled 865c31ac7b This change includes the following:
Scripting and logging functionality for sysinst.
Child programs are run in a "display window" so you can actually see what
	they did before the screen flashes back and you loose it all.
Lots of curses fixups.  Removed nasty endwins that mangled the tty upon
	rentry.
Change the yes/no box to accept Y or N, and not require cursor motion to
	decide one or the other.
Perform curses redraws when doing things that could cause the kernel to
	spew printfs onto your screen.
1999-01-21 08:02:17 +00:00
jonathan 9e93af392d Handle ifconfig "media: ethernet manual" output for devices with
non-soft-settable media.  Treat that as if there was no media output.

Use a supplied media-string of "<null>" or "<default>" or synonyms to
avoid passing explicit media flags onto ifconfig.
1998-11-09 07:56:11 +00:00
phil 984947d5b9 Change how network interfaces are selected to allow for longer names,
e.g. epic0.  (Fixes PR 5778)
1998-10-14 05:27:52 +00:00
phil 51fbe5aee3 Fix class c netmask. 1998-09-17 16:45:36 +00:00
hubertf bc66f03729 /route/s/-f/flush/ 1998-08-05 07:44:58 +00:00
mrg 32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:56:06 +00:00
mrg d1b0d1b602 KNF. 1998-06-20 13:05:48 +00:00
thorpej fee167dd96 Needs <time.h> 1998-02-09 07:34:16 +00:00
jonathan b59abe7c80 Set hostname (via sethostname()) after configuring network.
Save hostname in /etc/myname when saving networkg config.
From Nathan J. Williams <nathanw@mit.edu> in PR bin/4781.
1998-02-07 10:28:02 +00:00
fvdl 9630119c6d * mount NFS directory to get the sets from read-only,
same for floppies (from Christoph Badura)
* allow user to run 'Configure network' multiple times, to correct errors
  for example.
* deal with network interfaces that need explicit media type selection
  (i.e. ask for it when it is needed, also store it in the generated
  /etc/ifconfig.blah file on the destination disk)
1997-12-26 01:58:44 +00:00