Commit Graph

687 Commits

Author SHA1 Message Date
Jordan K. Hubbard
4c88964f89 Some fairly serious cleanup. The proper offset should now be used in
creating partitions.  Still need to get the mount points displaying carefully,
but I need to get this into my tree on time so that I can work on that.
1995-05-06 09:34:24 +00:00
Joerg Wunsch
2b33ce9350 Forcibly add -O2 to the vgaio CFLAGS, to work around a gcc bug. 1995-05-06 07:07:52 +00:00
Jordan K. Hubbard
e4d731b693 All the editors are finished. Now if I can just get a problem with libdisk
fixed, we should be able to fully set up the user's disk.  Still to come
with next commit:  filesystem setup, distribution extraction, final
configuration.
1995-05-05 23:47:47 +00:00
Jordan K. Hubbard
a2e3498a3c Everything but the partition editor is done. This commit is for MBR testing. 1995-05-04 23:36:23 +00:00
Jordan K. Hubbard
7c56cfd441 This will now write MBR entries - should be enough for testing. 1995-05-04 19:48:19 +00:00
Jordan K. Hubbard
2e363cad34 My latest round of changes - make the "slices" editor work. 1995-05-04 03:51:22 +00:00
Jordan K. Hubbard
786a5cad11 Change the perennially annoying reminder to "make depend" (which may or
may not be desired if you're just going to blow the kernel away again later)
and substitute one that tells the user where the new kernel build
directory actually IS, which can at least be argued to be useful information
in all cases.
Reviewed by:	davidg
1995-05-03 20:16:57 +00:00
Bill Paul
90b434aeb0 Cosmetic changes and paranoia checks:
ypbind.c:
Make fewer assumtions about the state of the dom_alive and dom_broadcasting
flags in roc_received().
Cosmetic changes and paranoia checks:

ypbind.c:
Make fewer assumtions about the state of the dom_alive and dom_broadcasting
flags in roc_received().

If select() fails, use syslog() to report the error rather than perror().

Check that all our malloc()s succeed. Report malloc() failure in
ypbindproc_setdom_2() to callers.

yplib.c:

Use #defined constants in ypbinderr_string() rather than hard-coded values.
1995-05-03 18:34:22 +00:00
Rodney W. Grimes
6de98b5d98 Put $Id$ on all of these.
Correct Makefile so that we build during all: and only install for
make install.

If /etc/sysconfig exists source it to get the flags for restarting
named with.  If /etc/sysconfig says no named runs, don't try to start one.

Don't attempt to kill anything if we can not find the named.pid file.

Reviewed by:	Nickolay N. Dudorov <nnd@gw.itfs.nsk.su>
1995-05-03 03:26:59 +00:00
Jordan K. Hubbard
411bac67a7 Commit my latest changes before having a nap. Still not close to done,
nor is it in sync with my working sources, but it leaves me less CVS hassles
to bring in the new files at this time.  Still no documentation to translate
quite yet, but soon.  This stuff is actually very close now.
1995-05-01 21:56:32 +00:00
Andrey A. Chernov
7439966a40 Don't accept usernames longer than 8 characters
Submitted by: Wolfram Schneider <wosch@cs.tu-berlin.de>
1995-04-30 19:20:25 +00:00
Jordan K. Hubbard
e40a316fcf o Add extra menu types (radio implemented, multiple choice shortly).
o Make the framework generally more robust.
o Figured out how to nest the menu descriptions - no more grotty initialization
  of menus.
o Fix bug with helpline and helpfile not being reset.
o Add stubs for the media selection code.

Coming next:  Fdisk and disklabel screens using Phk's new libdisk stuff.
1995-04-29 19:33:06 +00:00
Andrey A. Chernov
280bdae500 HAVE_SAVED_UIDS not depends of BSD version but depends
of _POSIX_SAVED_IDS from unistd.h, fix it.
1995-04-29 15:16:41 +00:00
Andrey A. Chernov
926f1d2e59 Close sec. hole: can exec pgm with more groups than calling user have
Include unistd.h and fix few argument old-way things
1995-04-29 13:55:34 +00:00
Andrey A. Chernov
ee9968eab5 Remove FreeBSD-specific setre*() cheat, we have working thing now 1995-04-29 13:38:14 +00:00
Andrey A. Chernov
aa4f20e4df Fix typo in HAVE_SAVED_UIDS define 1995-04-29 13:25:13 +00:00
Jordan K. Hubbard
d9a50f903f Whoops! One of my automatics was initialized to garbage. Fix it. 1995-04-28 18:24:31 +00:00
Søren Schmidt
de4c8be3eb Corrected variable names for syscons support. 1995-04-28 09:08:18 +00:00
Poul-Henning Kamp
ca927fef5b Don't dereference NULL pointers. 1995-04-28 04:58:19 +00:00
Poul-Henning Kamp
4ccbee740d Told Makefile about manpage. 1995-04-28 04:52:33 +00:00
Poul-Henning Kamp
f663de8187 Had a moment, wrote a manpage based on kprof's page. 1995-04-28 04:51:08 +00:00
Jordan K. Hubbard
2283d8e502 Use mtree -U instead of -u and put back error check. Thanks Rod! 1995-04-28 04:16:30 +00:00
Jordan K. Hubbard
d0d3dac501 This will be the module that handles all media detection. 1995-04-27 18:05:10 +00:00
Jordan K. Hubbard
ef42570d65 Latest raft of changes.
Added another couple of menu item types.

Reshuffled the menus and added a few more.  Sure wish I could figure out
how to initialize a menu with _one_ initializer rather than two! :(
1995-04-27 18:03:55 +00:00
Jordan K. Hubbard
4e278bdb76 Here is my first "framework" commit of the new sysinstall. There is a LOT
more to come in the next 24 hours, this is just the first stable result of
8 hours of hacking so far.  The specification format for menus is pretty
much hammered out and the beginnings (very humble) of the doc hierarchy
are present for an example.  It should be quite easy to add a lot more
menus quickly to this since I did go somewhat out of my way to make the
framework easy to work with.  This is NOT the glorious semi-graphical
sysinstall (or whatever its name will be) that the install-geeks are working
on, this is simply the "son of sysinstall" I've been promising to write in
the interim for 2.0.5 and 2.1R (super install doesn't come until 2.2R).
1995-04-27 12:50:35 +00:00
Jordan K. Hubbard
278ea7ecee Don't bother checking the return status of the mtree command - it returns
non-zero stats when it changes things, too.
1995-04-27 11:33:08 +00:00
Jordan K. Hubbard
9d69574dbc Close PR:
>Number:         368
>Category:       bin
>Synopsis:       Lpd doesn't log errors after failed exec
>Description:

If an exec done by lpd fails, nothing is sent to the system log
indicating what went wrong.  This is because lpd closes all of
the file descriptors before doing the exec, thus closing the syslog
file descriptor in the process.
[Fix applied]
Submitted by:	pritc003@maroon.tc.umn.edu
1995-04-27 04:56:10 +00:00
Bill Paul
456ebbf8f5 ypbind.c: Major overhaul.
- Moved to a more client-driven model. We aggressively attempt to keep
the default domain bound (as before) but we give up on non-default
domains if we lose contact with a server and fail to get a response
after one round of broadcasting. This helps drastically reduce the
amount of network bandwitdh that ypbind consumes: if a client references
the secondary domain at some later point, this will prod ypbind into
establishing a new binding anyway, so continuously broadcasting without
need is pointless.

Note that we still actively seek out a binding for our default domain
even if no client program has queried us yet. I'm not exactly sure if
this matches SunOS's behavior or not, but I decided to do it this way
since we can get into all sorts of trouble if our default domain comes
unbound. Even so, we're still much quieter than we used to be.

- Removed a bunch of no-longer pertinent comments and a couple of
chunks of #ifdef 0'ed code that no longer fit in to the new layout.

- Theo deRaadt must have become frustrated with the callback mechanism
in clnt_broadcast(), because he shamelessly stole the clnt_broadcast()
code right out of the RPC library and hacked it up to suit his needs.
(Comments and all! :)

I can understand why: clnt_broadcast() blocks while awaiting replies.
Changing this behavior requires surgery. However, you can work around
this: fork the broadcast into a child process and relay the results
back to the parent via a pipe. (Careful obervation has shown that the
SunOS ypbind forks children for broadcasting too, though I can only
guess what sort of interprocess communication it uses. pipe() seems to
do the job well enough.)

This may seem like the long way around, but it's not really that
hard to implement, and I'd prefer to use documented RPC library functions
wherever possible. We're careful to limit the number of simultaneous
broadcasters to avoid swamping the system (the current limit is 5).
Each clnt_broadcast() call only sends out a small number of packets
at increasing intervals. We're also careful not to spawn more than one
bradcaster for a given domain.

- Used clntudp_bufcreate() and clnt_call() to implement a ping()
function for directly querying a particular server so that we can
check if it's still alive. This lets me completely remove the old
bradcasting code and use actual RPC library calls instead, at the
cost of more than a few handfulls of torn-out hair. (Make no mistake
folks: I *HATE* RPC.) Currently, the ping interval is one minute.

- Fixed another potential 'nfds too big for select()' bug: use
_rpc_dtablesize() instead of getdtablesize().

- Quieted gcc -Wall a bit.

- Probably a bunch of other stuff that I've forgotten.

ypbind.8:

- Updated man page to reflect modifications.

ypwhich.c:

- Small mind-o fix from last time: decode error results from
ypbind correctly (*groan*)

yplib.c:

- same as above

- Change behavior of _yp_dobind() a little: if we get back a 'Domain
not bound' error for a given domain, retry a few times before giving
up and passing the error back to the caller. We have to sleep for a
few seconds between tries since the 'Domain not bound' error comes
back immediately (by repeatedly looping, we end up pounding on ypbind).
We retry at most 20 times at 5 second intervals. This gives us a full
minute to get a response. This seems to deviate a bit from SunOS
behavior -- it appears to wait forever -- but I don't like the idea
of perpetually hanging inside a library call.

Note that this should fix the problems some people have with bindings
not being established fast enough at boot time; sometimes amd is started
in /etc/rc after ypbind has run but before it gets a binding set up. The
automounter gets annoyed at this and tends to exit. By pausing ther YP
calls until a binding is ready, we avoid this situation.

- Another _yp_dobind() change: if we determine that our binding files
are unlocked or nonexistent, jump directly to code that pokes ypbind
into restablishing the binding. Again, if it fails, we'll time out
eventually and return.
1995-04-26 19:03:16 +00:00
Jordan K. Hubbard
f465ace952 Add code for dealing with URLs. 1995-04-26 15:08:23 +00:00
Jordan K. Hubbard
a0a72d6933 Make pkg_info URL aware (and also make it use the PKG_PATH properly, like
everyone else).  Try this:
	pkg_info ftp://freebsd.org/pub/FreeBSD/packages/all/gmake-3.73.tgz
1995-04-26 15:08:02 +00:00
Jordan K. Hubbard
34f907903d Add depend on libftp since this is now in lib. 1995-04-26 15:07:14 +00:00
Jordan K. Hubbard
18a7c7704f Add a great deal more error checking to various things. 1995-04-26 15:06:58 +00:00
Jordan K. Hubbard
7113d27114 Further work on making all this more robust in the face of failure.
Also allow URL specification for a package.  This works for things the
package may depend on, too.

Allow PKG_PATH to be used anywhere a package is being searched for.
1995-04-26 15:06:26 +00:00
Jordan K. Hubbard
80206f052f Yikes! How did that typo slip past! I'd swear I compiled it. Oh well,
thanks, Satoshi!

Embarrassed by:	asami
1995-04-26 12:37:46 +00:00
Jordan K. Hubbard
d14afa6dd2 As per Bruce's advice, use sysconf to get the max argument size and
dynamically allocate that much space, also using snprintf() and strncat()
to do proper bounds checking.
1995-04-26 11:43:20 +00:00
Jordan K. Hubbard
8d006a838c Check dependencies BEFORE doing final extraction of package.
Fix a bug where direct-extract mode would have still invoked the
packing list reordering commands.
1995-04-26 07:43:35 +00:00
Jordan K. Hubbard
0170dd7dec My handling of the missing dependency but !Verbose was wrong. Make
the right message come out.
1995-04-26 06:56:05 +00:00
Jordan K. Hubbard
1c491c8eb8 Use ARG_MAX instead of _POSIX_ARG_MAX: 4K is too small!
This should stop the SIGBUS errors in pkg_create for some packages.
1995-04-24 21:50:11 +00:00
Garrett Wollman
d259f40530 Grand new all-singing, dialog-wielding tzsetup(8). Still needs a man page. 1995-04-24 21:04:35 +00:00
Jordan K. Hubbard
cc472f1367 Commit the latest version of this. This version appears to handle package
failure much more gracefully, as well as implement a few new needed features.
Check it out!
Submitted by:	Marc van Kempen <wmbfmk@urc.tue.nl>
1995-04-24 13:01:04 +00:00
Jordan K. Hubbard
2a20a9edde Stage almost nothing through the playpen now - this should speed pkg_creates
up by a couple of factors, as well as decrease the amount of temporary space
required to build a package down to almost nothing.
1995-04-22 14:55:07 +00:00
Jordan K. Hubbard
3e1a18606d Export the min_free() function. 1995-04-22 13:58:44 +00:00
Jordan K. Hubbard
cbf098db0e Second round:
1. Make paths work correctly.
2. Make pkg_add generally more robust in the face of failure.
3. Make the depend messages come out on stderr or stdout, but not both
   interspersed! :-)
1995-04-22 13:58:24 +00:00
Jordan K. Hubbard
3ec12cb0ce Set a default PKG_PATH. 1995-04-22 10:58:23 +00:00
Jordan K. Hubbard
e692e3aa52 1. Add an new @option directive. You'll understand it better in a moment.
2. Fix a long-standing bug in pkg_add where the failure of one package in
   a multipackage installation (pkg_add *.tgz) would blow you right out of
   the water.  Ick.
1995-04-22 07:41:02 +00:00
Jordan K. Hubbard
adbcdd9cce Argh - missed a printf! That should be the last of plist-spewers. 1995-04-22 01:20:13 +00:00
Jordan K. Hubbard
922a707e02 Don't spew garbage into the packing list when PlistOnly and verbose are
both on.  Whoops!
1995-04-22 00:59:33 +00:00
Jordan K. Hubbard
cca32e93aa Some patches to make deletions of non-existent files and directories slightly
less fatal (so that the database entry is subsequently removed anyway).
Submitted by:	Edward Wang <edward@edcom.com>
1995-04-22 00:14:20 +00:00
Jordan K. Hubbard
3a5e372a3d 1. Add proper dependencies to the library in my Makefiles. This was pointed
out by Bruce.
2. Add a "feature" to pkg_create (OK, OK, it's a miserable hack!) to get
   it to dump its internal packing list out so that the `fake-pkg' rule in
   bsd.port.mk can generate a more meaningful packing list.
1995-04-22 00:03:18 +00:00
Bill Paul
644161688b small NIS binding fixes:
ypbind.c: if a client program asks ypbind for the name of the server
for a particular domain, and there isn't a binding for that domain
available yet, ypbind needs to supply a status value along with its
failure message. Set yprespbody.ypbind_error before returning from
a ypbindproc_domain request.

yplib.c: properly handle the error status messages ypbind now has the
ability to send us. Add a ypbinderr_string() function to decode the
error values.

ypwhich.c: handle ypbind errors correctly: yperr_string() can't handle
ypbind_status messages -- use ypbinderr_string instead.
1995-04-21 18:04:36 +00:00