when the single user shell was terminated. These changes disallow mounting
or R/W upgrading filesystems that are dirty unless "-f" (force) option
is used with mount. /etc/rc has been modified to abort the startup if
one or more non-nfs partitions fail to mount.
Reviewed by: Poul-Henning Kamp, Rod Grimes
- in mount_portal.c: included catching of SIGHUP to get portald to
re-read the config file.
- in mount_portal.c: in SIGCHLD handler the return values checked from
waitpid were wrong. Note. this routine was written correclty according
to the manual page for 4.4BSD, but waitpid does not exhibit this
behaviour. It is not returning 0 when WNOHANG is specified. I havent
checked this properly.
- in mount_portal.c: initialized the fdset for the select properly.
- in mount_portal.c: corrected poor casting in the select.
- in mount_portal.c: changed a break; to exit (0); so that the
children die after doing the hard work, this stops the select: bad
file descriptor messages.
- in pt_file.c: the kernel passes kernel style open flags to the
portal code which aren't compatible with "normal" O_ flags. I have
adjusted these in pt_file.c. In general I think the portal fs code
and portal_cred structure need changing to pass to the portald
the right style of flags _and_ the permissions.
- in pt_tcp.c: a few mistakes in typing of the socket structures,
getservbyname returns the port number as an int but sockaddr wants
the port number as an u_short.
- in pt_tcp.c: someone wrote this on a VAX/Sun whatever and forget
about byte ordering!! I've included a few htons about the place.
- in all the above I have sprinkled a few more debugging printf's.
Submitted by: "Duncan McL Barclay" <dmlb@ohm.york.ac.uk
in a couple of cases, and it doesn't do much anyway. It used to save only
the newfs params (block/frag/cgroup.. and nothing more. Something that
don't belong in a disklabel in the first place.
to open the mounted block device containing the directory to put the bad
sector files in, and opening of mounted block devices hasn't been allowed
since Net/2 or before. Attempt to open the raw device instead. Be more
careful about long names.
Use lstat() instead of stat() to search for block devices so that my
symlink to the default floppy doesn't cause problems.
Check for truncation of the block number when it is squeezed through the
mknod() interface. The maximum used to be only 32767, but now it large
enough.
you to push the same host into its NFS export lists twice, but mountd
tries to do it anyway. This means that putting:
/some_file_system -ro host1 host1
in your /etc/exports file causes an error. This is bogus: mountd should be
smart enough to ignore the second instance of host1. This can be a problem
in some configurations that use netgroups. For example, each host in my
netgroups database is has two entries:
startide (startide,-,) (startide.ctr.columbia.edu,-,)
When mountd sees this, it tries to put startide.ctr.columbia.edu into the
export list *twice*. Just listing 'startide' /etc/exports list will also
screw up because mountd will try to resolve the netgroup 'startide' instead
of the hostname 'startide.'
My solution is watch for duplicate entries in get_host() and mark them
as grouptype GT_IGNORE, which do_mount() will now cheefully throw away.
This is a bit of a kludge, but it was the least obtrusive fix I could
come up with.
Also silenced a compiler warning: arguments passwd to xdr_long() should
be u_long, not int. :)
in the man page. ifconfig -au affects all interfaces marked as up,
and ifconfig -ad affects only the interfaces marked down. ifconfig -a
still handles everything. This change is purely for compatibility with
SunOS, for those who might be accustomed to the SunOS ifconfig's
behavior.
established. This way, automatic scripts are possible that might
control the SLIP connection. It's unacceptable for a daemon that's
being controlled by a variety of signals to not leave its PID
somewhere. The file name contains the terminal path name component of
the associated tty device, so it should be unique even with multiple
parallel slattach's running. The file will be unlinked at regular exit.
Also found a minor bug in the option handling by compiling with -Wall.
is a pain in ...wel.. trying to fix this
* from/to/via position indepenndant syntax
* "any" for 0/0 host address
* addf/addb default keyword in case you skip it..
* pass = accept new action, seems to be somewhat better
in particular cases
* on = via (as on ed0 instead of via ed0,loook at
reject tcp on ed0 from hacker )
the values that it doesn't print by defaults. This seems wrong. I want
to be able to see the total number of sectors more than edit it. The
default d_secperunit of (sectors/track * tracks/cylinder * cylinders) is
bogus if sectors/track is only an approximation and more bogus if
sectors/track and tracks/cylinder are dummy values such as 4096 and 1
to defeat ufs's pessimizations.
via sysctl(8). The initial value of maxprocperuid is maxproc-1,
that of maxfilesperproc is maxfiles (untill maxfile will disappear)
Now it is at least possible to prohibit one user opening maxfiles
-Guido
Submitted by:
Obtained from:
ports for the destination IP addr/port.
Nobody reported this btw , while a lot of other things reported-
probably ppl does not use destination ports at all????
We pretend we have one head with two megabyte worth of sectors per cylinder.
The code try to access another head in what it belives to the same
physical cylinder, because it belives that it would be faster than
waiting for the next free sector under this head to come around.
Most modern drives doesn't have a "classical" geometry, and thus
we end up fooling ourselves doing the above optimization. With this
change we will fill a cylinder sequentially if we can, and thus get
much more mileage from the track-buffer/cache built into the drives.
As a result a lot of seeks to the next or previous track should be
avoided by this.
(My disk is a lot less noisy actually...)
You can still get the old behaviour, by specifying zero for the
numbers.
This will also solve the problem with newfs barfing at really big
drives.
Obtained from: adult advice from Kirk.
Include bteasy, bootsd, sdboot and termcap entries using file2.c
Remove all traces of "termcap.small".
The policy in this program regarding termcap is:
| If $TERM is set
| do nothing special, rely on usual termcap.
| else
| use compiled in (via file2c) termcap entries
misfeature caused troubles when a program attempted to access a shlib
where one with a higher minor number has been hashed. Ldconfig does
only include the highest-numbered shlib anyway, so this is in no way a
limitation of generality.
Caution: after installing the new programs, your /var/run/ld.so.hints
needs to be rebuiult; run ldconfig again as it's done from /etc/rc.
We have only one firewall chain and one accounting chain now.
No blocking/forwarding so commands changed.
Man pages are somewhat out of date and will be updated ASAP.
- The -a flag now works just as it does in SunOS: '-a' is actually
handled like a wildcard for all interfaces. 'ifconfig -a' displays
the status of all interfaces, 'ifconfig -a netmask 0xffffff00' sets
the netmask of all interfaces, and so forth. I don't know if many
people really need to be able to set the netmasks of all interfaces
at once, but the SunOS ifconfig seems to allow this, so there you
have it.
- An 'ether_status' function has been added to display the ethernet
address of all ethernet interfaces. Again, as in SunOS, you must
be root in order for this to work. The ethernet address is read
from /dev/kmem using kvm_open() and kvm_read(), much in the same
was as it's done with netstat. If you choose to install ifconfig
set-gid kmem then normal users will be able to see the ethernet
address as well, though this may not be desireable. This feature
requires a small change to the ifconfig Makefile: you need to link
with -lkvm in order to use the kvm_*() functions.
Submitted by: wpaul
warning handling and allows for link-time warnings with a modified
version of gas.
Note: Not all of the newer bits were updated such as some of the non-x86
machine-dependant code is relevant to FreeBSD right now.
Obtained from: NetBSD
determine whether a connection to a given machine is up or not.
In FreeBSD 2.0 (and therefore, I assume, BSD 4.4) the exit code of ping
is always zero, even if no packets were received.
I would like to propose the following change to /usr/src/sbin/ping/ping.c
to restore this useful behaviour:
Submitted by: Denis Fortin
a decimal value.
I don't have the time to deal with users typing in partition names
such as "FreeBSD" at the moment so just allow the numerical id to be
specified for the moment.
Could do with some cosmetic tuning regarding placement and things.
Fixed some dialog code (from Andrew).
Pass mountpoints onto stage2 in a struct fstab *mounts[]
Fix all the field connections to conform to the new L&F document.
Removed a layer of menus.
Auto select partition to install into -- first FreeBSD partition
in MBR table. Abort if no FreeBSD partition.
Added a F_BUTTON type.
Fixed up label editor to show free space properly.
Fixed a few bugs.
2. See if swapon() failed and at least print a diagnostic.
3. Use -1 instead of strheight()/strwidth() everywhere.
Reviewed by:
Submitted by:
Obtained from:
that the english in Ugen's two replacement pages is not too impenetrable! :-)
[Note: Poul - please pull these into the BETA branch along with the
other firewall changes]
Submitted by: ugen
struct lfs.
sovs@diku.dk:
The pad2 field in struct lfs is a kludge. You
need it because the raw devices has to be written in DEV_BSIZE. The
lfs_maxsymlinklen is needed because the tells the UFS code that we
want to use 4.4BSD directory layout insted of FreeBSD 1.1.5.
Reviewed by: Justin Gibbs
Submitted by: sovs@diku.dk
1. Don't use kernel name for headers - I'm running 2.0.1-Development,
not ALPHA, and this messes things up.
2. The last dialog was too big, make it a little smaller. Just cosmetic,
while I'm in here.
main.c sanitize the logic of what we do when:
if(getpid()!=1) do stage0 & stage1 (very useful actually)
else if (floppy-marker-file is there) stage0-2, reboot
else stage3-5
have to write the text-file it will dump on you.
Stopped using cleartoeol in AskEm(), just as a test to see if the screen
looks more sane.
Added a attempted auto-recognition of /, swap and /usr for the first disk
where it looks sensible. Logic of this might need to be improved.
Made a "ShowFile()" which will not bomb/ignore you if the file isn't there.
/sbin/umount does not return the correct exit status due to incorrect
logic in its internals.
Further, because of the nature of the code, you *cannot* use it to
umount a directory from a union mountpoint. Well, you can sometimes,
it depends on if the directory is at the top of the union stack or not :)
Submitted by: njw@cs.city.ac.uk (Nick Williams)
Make a stab at getting free space display to work.
Forward decls to shut compiler warnings up.
Increase some fields to width 2 in order to get edit_line to let you
actually edit them.
Sanity check values and yell at bonehead users.
Try to reformat this code to be a little more human. Weird europeans
have been writing this, and can't even seem to agree a single coding
style for more than 4 consecutive lines! :-)
most common cd9660 and nfs options like God intended them. (It is now
possible to say
mount -o ro,soft,bg,intr there:/foo/bar /foo/bar
again.) This whole getmntopt() business is an incredible botch;
it never should have been anything more than a wrapper around
getsubopt(3). Because if the way the current hackaround is implemented,
options which take arguments (like the old `rsize' and `wsize') are still
unavailable, and must be accessed the new, broken way.
(It's unimaginable how Berkeley managed to screw up one of the few things
about NFS that Sun actually got right to begin with!)
I have walked all over Paul Richards code again, and severely lobotomized
some of his stuff, in order to cut some corners for the 2.0-Alpha release.
I belive that we can now manipulate fdisk and disklabel-stuff sufficiently
for the release to actually be produced.
It's not that I don't like Paul and his code, I just need something I
can kick out of the door RSN.
Sysinstall is now under absolute code-freeze, only Jordan has my permission
to commit to this code (stage0 & 5). I would appreciate if everybody
else would finds problems in sysinstall send patches to me, and I will
commit them. THANKYOU.
The fdisk/disklabel editors are made in pure ncurses, and follow a model
"a`la spreadsheet".
There are some important functions which are missing still, and I would
appreciate if somebody would look at them.
The FDISK part needs a "whole-disk" option, and it needs a "rewrite
MBR-boot code" option.
The DISKLABEL part needs to be able to "import DOS-partition".
Both need a "HELP" function, (display a file "/HELP" using dialog is OK).
It seems to me like the wd.c and sd.c should reread the physical record
when a DIOCGDINFO is made, so that they can pick up changes in the
MBR-data. Otherwise there will be a couple of weird cases where we
cannot avoid replicating code from the kernel.
If you want to play with this, look at src/release/Makefile. You may need
to step back to version 1.38 of sys/i386/isa/fd.c to make "rootable"
floppies, it is not clear at this time if that indeed is the problem I
have been having.
Sleep well, my friends, and expect the real Alpha in 24H, if the tree is
still solid.
Removed a dialog_clear() which somebody aimlessly had slammed into TellEm()
in absence of any understanding of the structure of this program. :-(
Skip through stage0 for now.
Make write_bootblocks write the disklabel using the kernel-call, and forget
about the boot-blocks for now. This is wrong, but I havn't found the real
problem yet. I will continue work on this problem.
Added a Debug-feature. There is a printf' like Debug() now which sends its
output to ttyv1 (Alt-F2), and all "discarded output" from sub-processes end
up there too. Made TellEm() put it's messages there also, so that we can
see where what happens.
Set the PATH for the shell we shouldn't start at the end :-)
set "npartitions" after the disklabel-editor returns, so that we actually
can edit all the 8 parts of the label.
an array. The bug became obvious in the old system where the array was only
32 characters long (now MAXPATHLEN). Dump honored its name then (:-)
and dumped its core when calling dump -w for a fstab that contained rather long
NFS file system names. Even though this is rather unlikely to happen now,
a bug is a bug:)
Print out summary information on receipt of SIGINFO; also, stop the
kernel printing of information and restore it on exit. Now, it needs
an option to be quiet. ;)
All the mbr code now seems to be working. We can build a basic
unix disklabel in any existing DOS partition while retaining the
existing mbr bootcode or we can install to the whole disk which
puts FreeBSD's boot code into the MBR and creates a clean MBR
partition table with FreeBSD in partition 0 taking up the whole disk.
use dialog functions properly
move alloc_memory early to prevent core dump at stage 3
Change 25x80 to 24x80
Fix setenv diagnostic
Fix Fatal to call end_dialog()
Re-organised files, moved bootcode routines into their own files.
Check return types of everything and pass error messages to
windows so we get good diagnostics.
Made start on stage 2 installation. Implemented a status file that
keeeps track of where we are in the installation process and allows
installation from media sequences.
date: 1994/03/06 08:55:02; author: ache; state: Exp; lines: +4 -1
Stop count getty spacing problem, if we issue kill -1 1
----------------------------
revision 1.5
date: 1994/03/04 17:51:39; author: ache; state: Exp; lines: +9 -2
I got a lot of
"getty repeating too quickly on port %s, sleeping"
from init.bsdi, it means that getty start and exit in five seconds.
This is common situation for poor quality Russian phone lines:
modem got CONNECT message and after retries got NO CARRIER.
So I introduce spacing count, it means that this warning and
sleep occurse only after GETTY_NSPACE times of sequental attempts.
----------------------------
revision 1.4
date: 1994/02/28 21:53:52; author: ache; state: Exp; lines: +71 -10
I found (and fix) ugly bugs in init.bsdi (this bugs not present
in old init)
1) Init don't setup TERM environment variable for default terminal
type from /etc/ttys before calling getty/window.
2) When "kill -1 1" issued, init don't restart getty when
/etc/ttys parameters was changed (it only kill "off" end empty entries).
3) Small memory leak if "window" /etc/ttys parameter specified and
"kill -1 1" issued.
Obtained from: FreeBSD 1.x
being output if <= 1 rpos; there is a bug in the kernel which doesn't
quite get along with this. Changed default #rpos to 1, and fixed up
manual page. Converted nrpos to 1 if user specifies 0.
the use of the rotational position table.
2) Allow specification of 0 rotational positions (disables function).
3) Make rotdelay=0 and nrpos=0 by default.
The purpose of the above is to optimize for modern SCSI (and IDE) drives
that do read-ahead/write-behind.
DANGER WILL ROBINSON!
_PATH_UNIX is currently defined as the literal string "don't use this".
I am of two minds about this myself, but wanted to get something into the
tree as quickly as possible.
modload doesn't honor it's -p argument.
It also will destroy the input file when you don't specify an output
symbol file with -o.
Submitted by: John Kohl
arrange for that directory to get created by mtree. Also, process secure
directory after all the others, because the programs there may overlay
ones installed from the main part of the tree.
device driver cannot supply a label (real or faked). This allows
you to practice using fdisk on disposable media (e.g., "dd count=1
<dev/zero >/tmp/junk; fdisk /tmp/junk", "dd count=1 </etc/passwd
>/tmp/fix-up-the-mess; fdisk /tmp/fix-up-the-mess") and allows me
to test DOSpartitioning and labelling on floppies.
Also moved some KERBEROS related stuff inside the #ifdef.
Should we always try to do a reverse lookup (IP#->name) ?
It has som merit, but is probably against the tradition or huh ?
with DavidG, I've come to the conclusion that unless and until we define
a new directory to put these things in, /sbin is the right place.
(OSF/1 does a lot worse for non-executables in /sbin...).
1) dir.c: get byte order right in mkentry()
2) pass1.c: When doing -c2 conversion, do secsize reads for a symlink -
not doing so was causing the conversion to fail because the device
driver can't deal with short reads.
FDs and fork before redialing) to prevent dialer from hanging with
newer sio.c.
Also moved history from the source to the cvs log (here) per
David G's suggestion.
This compiles but needs testing now... Rich
/*
* Hacks to support "-a|c|n" flags on the command line which enable VJ
* header compresion and disable ICMP.
* If this is good all rights go to B & L Jolitz, otherwise send your
* comments to Reagan (/dev/null).
*
* nerd@percival.rain.com (Michael Galassi) 92.09.03
*
* Hacked to change from sgtty to POSIX termio style serial line control
* and added flag to enable cts/rts style flow control.
*
* blymn@awadi.com.au (Brett Lymn) 93.04.04
*
* Put slattach in it's own process group so it can't be killed
* accidentally. Close the connection on SIGHUP and SIGINT. Write a
* syslog entry upon opening and closing the connection. Rich Murphey
* and Brad Huntting.
*
* Add '-r command' option: runs 'command' upon recieving SIGHUP
* resulting from loss of carrier. Log any errors after forking.
* Rich 8/13/93
*
* This version of slattach includes many changes by David Greenman, Brian
* Smith, Chris Bradley, and me (Michael Galassi). None of them are
* represented as functional anywhere outside of RAINet though they do work
* for us. Documentation is limited to the usage message for now. If you
* make improovments please pass them back.
*
* Added '-u UCMD' which runs 'UCMD <old> <new>' whenever the slip
* unit number changes where <old> and <new> are the old and new unit
* numbers, respectively. Also added the '-z' option which forces
* invocation of the redial command (-r CMD) upon startup regardless
* of whether the com driver claims (sometimes mistakenly) that
* carrier is present. Also added '-e ECMD' which runs ECMD before
* exiting.
*
* marc@escargot.rain.com (Marc Frajola) 93/09/10
*
* Minor fixes to allow passive SLIP links to work (connections with
* modem control that do not have an associated dial command). Added
* code to re-check for carrier after dial command has been executed.
* Added SIGTERM handler to properly handle normal kill signals. Fixed
* bug in logic that caused message about no -u command to be logged
* even when -u was specified and the sl number changes. Tried to get
* rid of redundant syslog()'s to minimize console log output. Improved
* logging of improper command line options or number of command
* arguments. Removed spurious newline characters from syslog() calls.
*
* gjung@gjbsd.franken.de
*
* sighup_handler changed to set CLOCAL before running redial_cmd.
* added flag exiting, so exit_handler is not run twice. Fork
* before reopening tty.
*/
preen (-p), and in that case the filesystem is skipped if it is clean.
A new flag "-f" for 'force' has been added which basically gives back
the old behavior of checking all the filesystems all the time. This
very closely models the behavior of SunOS and Ultrix.
handling of errors through the standard err() and warn()
more fixes for Geoff Rehmet's NULL pointer bug.
fixes NULL pointer bugs when linking mono and nested X servers.
supports a `-nostdlib' option.
accept object files without a symbol table
don't attempt dynamic linking when `-A' is given
a few variable names have chaged (desc -> fd), and the formatting has
changed which should make it much easier to track his sources.
I tested 'make world' for /usr/src and X twice with these changes.