Commit Graph

13031 Commits

Author SHA1 Message Date
Josh Paetzel
e4985e44df Roll up several patches used by PC-BSD.
- Fix an issue with gmirror.
- Allow IPv4 DHCP and IPv6 SLAAC concurrently.
- Fix zpool options using the wrong device name.

Approved by:	kib (mentor)
Obtained from:	kris@pcbsd.org
MFC after:	3 days
2011-11-05 19:25:21 +00:00
Doug Barton
b90270a146 1. Add a new option, --run-updates, to always or never run the newalises,
pwd_mkdb, etc. updates at the end of the comparison.

2. Add an update to the end to handle /etc/localtime, if it exists.
   If /var/db/zoneinfo exists, automatically update /etc/localtime,
   which should (hopefully) be safe to do. If not, prompt the user
   to run tzsetup.

3. Update run_it_now(), the function that handles input for the updates,
   to make sure that we got a valid answer, and to handle the --run-updates
   option if supplied.
2011-11-02 07:40:23 +00:00
Doug Barton
983ac1b7fc If the user is moving from any other time zone to UTC we need
to delete any old /var/db/zoneinfo file that may exist so that
tzsetup -r does the right thing.
2011-11-02 04:21:20 +00:00
Fabien Thomas
66ce99369a Two bugs fixed:
- Do not close stdout or stderr when redirecting to file.
- Correctly handle error code to detect when no buffer available.

MFC after:	1 month
2011-11-01 09:28:47 +00:00
Nathan Whitehorn
41f2f866d0 Provide an error message and error handling if there are no network
interfaces in the system. This is a non-fatal error except when doing a
network installation.

PR:		bin/161950
MFC after:	3 days
2011-10-25 16:35:48 +00:00
Nathan Whitehorn
07d7662678 Provide an error message instead of silent failure if no disks are present
in the system.

PR:		bin/161950
MFC after:	3 days
2011-10-25 16:30:16 +00:00
Gleb Smirnoff
b8e20190a3 Protect NIS server with madvise(2) since this daemon is required
for succesful authentication of users.
2011-10-25 10:33:26 +00:00
Andrey V. Elsukov
9f772ce219 Fix argument name. This fixes EINVAL when boot0cfg uses GEOM_PART'
control interface.

MFC after:	3 days
2011-10-25 04:15:45 +00:00
Xin LI
5b1fd5dbbf Staticify elide_root() for now to fix build. 2011-10-24 21:38:25 +00:00
Ed Maste
6f8193d2c4 Avoid printing // for packages that install to /
I have some packages that install to / (for whatever reason).  Right now we
print entries of the form //path/to/file when listing files (pkg_info -L,
pkg_info -g etc.)  This change avoids printing the redundant / .
2011-10-24 18:29:50 +00:00
Gleb Smirnoff
5838507bd7 Protect NIS client with madvise(2) since this daemon is required
for succesful authentication of users.
2011-10-24 14:35:31 +00:00
Ivan Voras
1c4edd12cd Apparently, "ada" drives are better treated similarly to "da" drives. 2011-10-24 12:59:39 +00:00
Ivan Voras
9601613ecd It seems that the warning is much less severe than its message says. The
device is certainly added to the list after the first pass.
2011-10-24 12:43:20 +00:00
Ivan Voras
e9e42921af Fix typo
MFC after:	1 month
2011-10-24 12:21:58 +00:00
Nathan Whitehorn
987415b113 Avoid some "Invalid argument" errors in the installer.
PR:		bin/161926
MFC after:	5 days
2011-10-23 16:57:10 +00:00
Colin Percival
97d4be7ebc Add '%' and '@' to the set of characters which can appear in path names.
Without this change, freebsd-update refuses to accept 9.0 metadata files.
2011-10-23 06:23:11 +00:00
Fabien Thomas
dceed24a7c Add a flush of the current PMC log buffer before displaying the next top.
As the underlying block is 4KB if the PMC throughput is low the measurement
will be reported on the next tick. pmcstat(8) use the modified flush API to
reclaim current buffer before displaying next top.

MFC after:	1 month
2011-10-18 15:25:43 +00:00
Ken Smith
22a84ec9b9 Escape the newline so we get a proper line continuation. Without this
the text of the menu selections doesn't get displayed properly and it
makes the installer appear to lock up for no obvious reason.

Reviewed by:	nwhitehorn
2011-10-18 11:29:10 +00:00
Eitan Adler
6b15a26aa6 - remove device keyword from makefs manpage
PR:		docs/144408
Submitted by:	gcooper
Approved by:	gjb
Approved by:	sahil (mentor)
MFC after:	1 week
2011-10-17 21:31:03 +00:00
Hans Petter Selasky
6a3b2e7773 Make the usbdump utility work again by using the correct BPF structures.
MFC after:	3 days
2011-10-17 15:54:20 +00:00
Nathan Whitehorn
5d920ef704 Place quotes around the output of kbdmap(1), designed to be pasted into
/etc/rc.conf.

PR:		bin/161711
Submitted by:	manolis
MFC after:	1 week
2011-10-16 16:05:23 +00:00
Eitan Adler
36daf0495a - change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by:	lstewart
Approved by:	sahil (mentor)
MFC after:	3 days
2011-10-16 14:30:28 +00:00
Craig Rodrigues
8d1a3b6998 Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
option is defined.  This sysctl can be queried by feature_present(3).

Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
If these utilities detect that ATA_CAM is enabled, then these utilities
will error out.  These utilities are compatible with the old ATA
driver, but are incomptible with the new ATA_CAM driver.  By erroring out,
we give end-users an idea as to what remedies to use, and reduce the need for them
to file PR's.  For atacontrol, camcontrol must be used instead,
and for burncd, alternative utilties from the ports collection must be used
such as sysutils/cdrtools.

In future, maybe someone can re-write burncd to work with ATA_CAM,
but at least for now, we give a somewhat useful error message to end users.

PR:		160979
Reviewed by:	jh, Arnaud Lacombe <lacombar at gmail dot com>
Reported by:	Joe Barbish <fbsd8 at a1poweruser dot com>
MFC after:	3 days
2011-10-09 21:42:02 +00:00
Nathan Whitehorn
703d6e3e8d Add support to makefs(8) to add UFS labels to images.
Submitted by:	avg
MFC after:	3 days
2011-10-09 16:22:31 +00:00
Nathan Whitehorn
7899c6c10f Avoid magicking into existence sub-partitions due to leftover blocks when
creating new ones by destroying any geom that may have come into
existence immediately after adding a partition. The EBR partition scheme
is particularly enthusiastic about false positives in this case.

MFC after:	3 days
2011-10-08 16:45:03 +00:00
Nathan Whitehorn
a780c996f4 Usability enhancements: do not allow setting a mountpoint on bsdlabel
container partitions, which didn't do anything anyway, and check for
an existing freebsd-boot partition before bothering the user to make one.

PR:		bin/160931
MFC after:	3 days
2011-10-08 14:59:12 +00:00
Nathan Whitehorn
f36a5e0f34 Work around some behavior of gpart that I absolutely do not understand in
order to make every operation of the partition editor fully revertable.
Under *no circumstances* will it any longer touch the disks until the user
presses Finish and confirms it.

MFC after:	3 days
2011-10-07 01:40:30 +00:00
Nathan Whitehorn
ab9a96be12 Move "Exit" to the first entry in the list, so that it is the default
choice.

PR:		bin/160913
MFC after:	3 days
2011-10-06 14:24:37 +00:00
Nathan Whitehorn
77d0854ba5 Ask if you want to set the keymap before invoking kdbmap to prevent
confusion.

PR:		bin/160913
MFC after:	3 days
2011-10-06 14:22:38 +00:00
Jilles Tjoelker
b77e3cbad1 portsnap: Detect error immediately if we can't fetch the snapshot metadata.
Also add some quotes around command substitution where useful and possible.

Reviewed by:	cperciva
MFC after:	1 week
2011-10-04 22:28:06 +00:00
Nathan Whitehorn
e59e2d8ec7 Farewall, sysinstall! You served us well for many years, but 10.0 is one
digit beyond your time.

Various sysinstall dependencies (e.g. libftpio, libdisk, libodialog, etc.)
will be cleaned up in coming days. Some will take longer than others due to
a few other consumers (tzsetup and sade).
2011-10-03 15:13:09 +00:00
Ed Schouten
9f365aa1d6 Get rid of major/minor number distinction.
As of FreeBSD 6, devices can only be opened through devfs. These device
nodes don't have major and minor numbers anymore. The st_rdev field in
struct stat is simply based a copy of st_ino.

Simply display device numbers as hexadecimal, using "%#jx". This is
allowed by POSIX, since it explicitly states things like the following
(example taken from ls(1)):

	"If the file is a character special or block special file, the
	size of the file may be replaced with implementation-defined
	information associated with the device in question."

This makes the output of these commands more compact. For example, ls(1)
now uses approximately four columns less. While there, simplify the
column length calculation from ls(1) by calling snprintf() with a NULL
buffer.

Don't be afraid; if needed one can still obtain individual major/minor
numbers using stat(1).
2011-09-28 18:53:36 +00:00
Ed Maste
b08d3049f0 Improve battery capacity reporting
When a status pointer is passed in mfi_dcmd_command does not return an
errno (if the ioctl is successful), so move the test for NO_HW_PRESENT
outside of the error case.  This should fix incorrect reporting for
systems with a dead or no battery.

Additionally, handle error codes other than NO_HW_PRESENT by omitting
the battery capacity display.  LSI's supercap-based parts (CV series)
report their data using the same interface as battery-based parts,
except that they do not include the capacity stats (state of charge,
cumulative charge cycles, etc.)

Reviewd by:   jhb, bz
Tested by:    pluknet@, Garrett Cooper
PR:           bin/160581
MFC after:    1 week
2011-09-27 14:28:07 +00:00
Ken Smith
8a3b6cc1e1 Shift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing
it from the 9.0-RELEASE release cycle code freeze.

Approved by:	re (implicit)
2011-09-26 02:27:04 +00:00
Hiroki Sato
8cdd0a8091 Remove RA timer on an interface with !IFF_UP actively after starting to send
clean-up RA messages for shutting down.  The RA timers could prevent the rtadvd
daemon from shutting down because ra_output() just ignored !IFF_UP interfaces
and TRANSITIVE->UNCONFIGURED state transition never happened due to it.

Spotted by:	kib
Approved by:	re (bz)
2011-09-20 00:32:30 +00:00
Josh Paetzel
c49e3f837c Fix a logic bug in pc-sysinstall creating partitions.
Improve exit when an error occurs.
Fix parsing to grab values which contain extra '=' signs.
Fix a bug setting the timezone properly.
Fix a usage bug when setting up with gmirror.
Allow a uzip file from local media to be used.
Allow specifying flags for "newfs" when using UFS as the file system.
Run custom commands after doing final cleanup / fstab generation
and such. Also fix using relative path for config file.

Approved by:	re (bz)
2011-09-19 05:12:53 +00:00
Nathan Whitehorn
6d02d4cbc5 Inquire about terminal type if starting from a serial console and do
not configure the host's networking if netbooted [1]. Also fix FTP
installations behind some firewalls [2].

PR:		bin/159583 [2]
Reported by:	stas [1]
Approved by:	re (kib)
2011-09-17 09:25:45 +00:00
Nathan Whitehorn
0d49c6d5c1 Fix a typo introduced in r219892 that prevented file system options from
being set correctly.

Approved by:	re (kib)
2011-09-16 09:38:01 +00:00
Nathan Whitehorn
3d50f9421e Fix WPA setup broken by changes to shell argument passing inside the
installer network configuration.

PR:		bin/159558
Approved by:	re (kib)
2011-09-16 09:37:13 +00:00
Sergey Kandaurov
566dafa360 Print the package name on deletion errors.
It appears this was already done in NetBSD a decade ago, hence
I just reuse the change (except our code is bad styled).

PR:		bin/160516
Approved by:	portmgr
Approved by:	re (kib)
Obtained from:	NetBSD
2011-09-16 09:09:58 +00:00
Christian Brueffer
a4de89de11 Allow WPA PSKs up to 63 characters, the max length according to
wpa_supplicant.conf(5).  Up to now, the PSK was truncated
to 15 characters (the length of the input field).

PR:		159559
Submitted by:	Gavin Chappell <gavin.chappell@gmail.com>
Approved by:	re (kib)
2011-09-13 21:39:26 +00:00
Hiroki Sato
489e04d0da - Add ":origin" label to the interface id for resolvconf(8). (r223149)
- Add -u option to enable adding :[RA-source-address] to the interface id.
  (r223149)
- s/INET6_ADDRSTRLEN/sizeof(ntopbuf)/  (r223149)
- Fix a bug that can prevent -D from being overridden by -d. (r223149)
- /-P pidfile/-p pidfile/ for consistency with rtadvd(8). (r223149)
- Fix -F flag handling to support receiving RAs even when ip6.forwarding=1.
  (r225150)

Approved by:	re (kib)
2011-09-12 23:55:23 +00:00
Hiroki Sato
aed378729e - Fix a bug that can lead to displaying an incorrect value. (r224210)
- Fix an abnormal termination caused by twice of "rtadvctl disable". (r224303)
- Use poll() to wait for the control message socket instead of a spin loop.
  (r224304)
- s/cmsg_/cm_/ to avoid conflict with CMSG_* symbols for struct cmsghdr.
  (r224619)
- Ignore an interface that never sent RAs for graceful shut-down. (r224620)
- Refine log messages. (r225148)
- Fix SIGSEGV when receiving RAs that contain RDNSS and/or DNSSL options.
  (r225149)

Approved by:	re (kib)
2011-09-12 23:52:55 +00:00
Christian Brueffer
c9c00408c5 Add ftp4.se.freebsd.org to the IPv4 and IPv6 mirror lists.
PR:		157210, 157211
Submitted by:	Niclas Zeising <zeising@lysator.liu.se>
Approved by:	re (kib)
2011-09-10 09:40:00 +00:00
Bjoern A. Zeeb
092b5f7c3f Correct a typo.
Submitted by:	gcooper
Reviewed by:	nwhitehorn
Approved by:	re (kib)
2011-09-07 00:48:58 +00:00
Bjoern A. Zeeb
5b046b47ec Fix two problems:
1) if no default gateway is given the route command will fail
   and the script will abort with an error leading to an endless
   loop unless configuration is cancelled or changed. [1]
2) In the IPv6 case add -inet6 to not alter the legacy IP default
   route.

Reported by:	Oleg Ginzburg (olevole olevole.ru) [1]
Tested by:	Oleg Ginzburg (olevole olevole.ru) [1]
Approved by:	re (kib)
2011-09-07 00:45:15 +00:00
Doug Barton
6fae67da24 Upgrade to BIND version 9.8.1. Release notes at:
https://deepthought.isc.org/article/AA-00446/81/
or
/usr/src/contrib/bind9/

Approved by:	re (kib)
2011-09-03 07:13:45 +00:00
John Baldwin
2e5df98a18 Move the logic to parse volume cache commands out into a separate function
and use a loop so that multiple cache commands can be strung together on
the command line into a single update to the volume's properties.

Reviewed by:	bz
Approved by:	re (kib)
MFC after:	1 week
2011-09-02 16:00:51 +00:00
Nathan Whitehorn
f68ebb0eec Swap FTP paths to be MACHINE/MACHINE_ARCH instead of MACHINE_ARCH/MACHINE.
This follows what the output of make targets looks like, and reduces the
number of directories needed on the FTP server, since we now have only one
architecture with multiple machine types (i386, which has i386 and pc98),
but 3 machines with 9 architectures between them (powerpc, mips, and arm).

Requested by:	kensmith, bz
Approved by:	re(kensmith)
2011-08-30 18:23:36 +00:00
Bjoern A. Zeeb
64371599f0 If a drive is not part of the array (i.e. missing) we need to print the
new line after the pd state information as well, so move it to the outside
of the block.

Submitted by:	Mark Johnston at Sandvine Inc
MFC atfer:	3 days
Approved by:	re (kib)
2011-08-25 08:47:38 +00:00