Commit Graph

17471 Commits

Author SHA1 Message Date
Warner Losh
cac7bbe16a There's no need / benefit from deleting the variable before we set it.
Sponsored by: Netflix
2018-01-06 06:00:40 +00:00
Warner Losh
af9d0c273f Fix usage strings. -d and -p were removed before this was committed to
FreeBSD, but the strings weren't updated.

Sponsored by: Netflix
2018-01-06 06:00:34 +00:00
Konstantin Belousov
0530a9360f Make it possible to re-evaluate cpu_features.
Add cpuctl(4) ioctl CPUCTL_EVAL_CPU_FEATURES which forces re-read of
cpu_features, cpu_features2, cpu_stdext_features, and
std_stdext_features2.

The intent is to allow the kernel to see the changes in the CPU
features after micocode update.  Of course, the update is not atomic
across variables and not synchronized with readers.  See the man page
warning as well.

Reviewed by:	imp (previous version), jilles
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D13770
2018-01-05 21:06:19 +00:00
Li-Wen Hsu
be5f9a5a5d Fix typo & build
Approved by:	kevlo
2018-01-05 08:29:32 +00:00
Warner Losh
e96d5d7bb3 Remove dead code (comma is either 0 or 1 for sure, no need to test).
Close /dev/pci when we're done with it.

CID: 1007450, 1007449, 1008615, 1008614
2018-01-05 07:29:02 +00:00
Warner Losh
65273b4808 bits is never null when we call ot. Add an assert to that effect and
remove test for NULL.

CID: 270774
2018-01-05 07:28:58 +00:00
Warner Losh
6dc0176690 Tag 'a' case as one we're intentionally falling through to
the 'F' case.

CID: 1008176
2018-01-05 07:28:48 +00:00
Warner Losh
5066eaeb75 Add a number of sanity checks to the data that we're handling from the
CIS. Coverity has tagged it as tainted. While this data is more
trusted than your average data, we still need to do some basic
validation on it. Check ioctl return value to ensure we switch memory
targets between common and attribute as well as the lseek.

CID: 1210464, 1006640, 1006868, 1007292, 1009091, 1009822, 1009824
2018-01-05 07:09:40 +00:00
Warner Losh
167b7a41ff Set dp to NULL when we free it, and tree a NULL dp as an error
condition. This should prevent a double free. In addition, prevent a
leak by freeing dp each loop and when we're done.

CID: 1383577
Sponsored by: Netflix
2018-01-05 07:09:24 +00:00
Warner Losh
63b5669494 Free options before setting them. This will prevent us from leaking
memory when we have multiple copies of the same option from being
specified.

Sponsored by: Netflix
2018-01-05 07:09:19 +00:00
Warner Losh
da15338df8 Ensure that we have a description string. When unspecified, default to "".
Sponsored by: Netflix
2018-01-05 07:09:09 +00:00
Warner Losh
53584cf69c Don't close fd twice. This line should have been deleted in r327279.
CID: 1384015
2018-01-05 05:34:20 +00:00
Warner Losh
b98c751962 Fix cut and paste error from devinfo.8 origin of this file
Noticed by: kevans@
2018-01-05 05:02:09 +00:00
Edward Tomasz Napierala
49f053978d Fix warnings from "mandoc -Tlint -Wwarning".
Reported by:	Yuri Pankov <yuripv at gmx.com>
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-01-03 17:28:01 +00:00
Ed Maste
f68e716ffe kldxref: correct function names in warning messages
Sponsored by:	The FreeBSD Foundation
2018-01-02 21:31:54 +00:00
Conrad Meyer
35f85edc80 rpcbind: Fix race in signal termination
If a signal was delivered while the main thread was not in poll(2) and after
check was performed, we could reenter poll and never detect termination. Fix
this with the pipefd trick.  (This race was introduced very recently, in
r327482.)

PR:		224503
Reported by:	kib
Reviewed by:	kib, markj
Sponsored by:	Dell EMC Isilon
2018-01-02 17:25:13 +00:00
Baptiste Daroussin
8b081eaa55 Revert r326844
There has been some fallout from the change. The change itself was not valueable
enough to spend time investigating the corner cases, let's just back it out.

Reported by:	flo
2018-01-02 16:50:57 +00:00
Nathan Whitehorn
8befcf7be1 Add installer support for PS3 and PowerNV systems, also laying the
foundation for invoking efibootmgr as part of new-style EFI booting on
x86. On PS3 and PowerNV, which are booted using Linux kexec from petitboot
rather than by loader(8), install the kernel and the rest of /boot to a
FAT partition and set up the appropriate petitboot configuration file
there.

The new bootconfig installer stage can do platform-dependent modifications
more complex than partition layout and installation of boot blocks and can
be used to (as here) set up some special configuration files, run efibootmgr,
or boot0cfg.

MFC after:	1 month
2018-01-02 05:27:24 +00:00
Nathan Whitehorn
a5837f2c26 Skip errors from being unable to set modification and creation times. If
one of the directories in the filesystem hierarchy is a FAT mountpoint,
settings its times will fail, which would cause installation to abort.
Instead, make this a best-effort thing.

Handling this error is a hack and a better internal scheme for handling
this should be added to libarchive.
2018-01-02 05:22:54 +00:00
Conrad Meyer
b545252a16 rpcbind: Fix build
Add missed unistd.h include.  Not sure where it was lost; I believe it
compiled before I submitted the change.

PR:		224503
Reported by:	Cy Schubert <Cy.Schubert AT komquats.com>
Sponsored by:	Dell EMC Isilon
2018-01-02 01:48:11 +00:00
Conrad Meyer
055569f608 rpcbind: Do not use signal-unsafe functions in SIGTERM handler
syslog(3), routines used in write_warmstart(), and exit(3) are all
signal-unsafe.  Instead, set a signal-safe flag and check the flag in the
rpcbind main loop to shutdown safely.

PR:		224503
Reviewed by:	kib, markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D13728
2018-01-02 00:48:19 +00:00
Eitan Adler
88791bd8f6 bsdinstall: inform users that typing will not be visible
Some users, especially those that are new, might be confused when passwd
does not echo anything. Inform users that the password will not be
visible.

PR:		196113
Submitted by:	Byron Grobe <grobe0ba@gmail.com>
2018-01-01 22:10:21 +00:00
Xin LI
c3fc0d96f3 Remove unused includes. 2018-01-01 09:41:18 +00:00
Eitan Adler
df76ac9951 newsyslog: implement 'p' flag
Implement the 'p' flag for newsyslog from NetBSD. This flag results in
the first log file for a given file to not be compressed.

While here, don't change file attributes during a no-op run

PR:		162798
Submitted by:	heas@shrubbery.net
MFC After:	1 month
2017-12-31 22:01:36 +00:00
Nathan Whitehorn
9f7602f019 Teach bsdinstall partedit/sade how to format FAT partitions on GPT, which
have the partition type code "ms-basic-data".

MFC after:	2 weeks
2017-12-31 03:13:45 +00:00
Edward Tomasz Napierala
2e07d451f9 Improve usbconfig(8) manual page by adding descriptions for subcommands.
Reviewed by:	hselasky
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13445
2017-12-30 12:56:50 +00:00
Konstantin Belousov
7028c31d21 Style. Remove useless return.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-12-28 13:01:27 +00:00
Konstantin Belousov
298321a2e9 Complete r327264 by fixing yet another return without cleanup.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-12-28 12:59:48 +00:00
Warner Losh
d8dfc65f43 Close fd when we're done dv-sending the file.
CID: 978413
2017-12-28 05:34:38 +00:00
Warner Losh
80c3f90ed4 Don't leak outfile. Free it before we return from bincvt.
CID: 273685
2017-12-28 05:34:14 +00:00
Warner Losh
7790c87b71 Free zbuf when kflag is true too.
CID: 273376
2017-12-28 05:34:04 +00:00
Warner Losh
d79dc9b482 Use proper failure path rather than just returning.
CID: 1199354, 1006894, 1006893, 1006892
2017-12-28 05:33:24 +00:00
Warner Losh
1987e300d0 Explicitly ignore return value from remove. We wouldn't do anything
differently if we can't unlink the temporary file. Also, free the
temporary file name when we set it to NULL.

CID: 1006909, 719448
2017-12-28 05:33:19 +00:00
Warner Losh
829ec26617 Don't leak resources on duplicate -m or -M arguments. Last one wins.
CID: 1204385, 1204384
2017-12-28 05:32:59 +00:00
Eitan Adler
837fe32558 Fix a few more speelling errors
Reviewed by:		bjk
Reviewed by:		jilles (incl formal "accept")
Differential Revision:	https://reviews.freebsd.org/D13650
2017-12-28 01:31:28 +00:00
Nathan Whitehorn
6134b18696 Fix bug introduced in r326674, in which efi boot partitions created by
the installer but not mounted (i.e. with boot1.efifat dd'ed to them
rather than the forthcoming proper filesystem) would get newfs_msdos run
on them immediately after the boot code was copied. This would overwrite
the bootstrap code, causing the EFI system partition to be blanked and
resulting in an unbootable system.

PR:		224562
2017-12-28 01:21:30 +00:00
Warner Losh
f77a6187eb Use strl* here too.
CID: 1383969
2017-12-27 20:33:37 +00:00
Warner Losh
3888260471 Fix a bunch of issues (and a few non-issues but appeasement is easier
than arguing) Coverity found:

o Use open + fstat rather than stat + open to avoid any races for a
  file that's static for the life of the system. This will prevent any
  problems should someone insert a new device while installing a
  kernel in the future.
o Use strlcpy instead of strcpy as a failsafe to knowing that the
  strings can't possibly be larger than the buffer due to data
  source limits (though in the future these limits might be more
  dynamic).
o If we can't find the hints file, return rather than dereference
  a NULL pointer.
o Check for lastmod before calling strcmp in case a PNP entry
  comes before a module entry. That's not allowed, but within the
  realm of crazy things programmers do.
o Free lastmod before exiting search_hints() to avoid a leak.

CID: 1383971, 1383970, 1383969, 1383965, 1383963, 1383960
2017-12-27 18:30:24 +00:00
Eitan Adler
dae3a64fb9 userland: Fix several typos and minor errors
- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by:	imp, benno
2017-12-27 03:23:01 +00:00
Jilles Tjoelker
2fe0ea7324 nandtool: Add missing mode for open() with O_CREAT
If O_CREAT is given, open() needs a mode argument. Follow the umask by
passing 0666.

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D13607
2017-12-26 16:20:38 +00:00
Warner Losh
d383021fa7 Fix typo 2017-12-26 04:07:18 +00:00
Warner Losh
4f7afd4f37 Doh! Never test in one tree and commit from another:
Fix typo: devmath -> devmatch

Sponsored by: Krampus! Carting off naughty committers for millennia
2017-12-25 19:08:39 +00:00
Warner Losh
d9aed21ce3 Match unattached devices on the system to potential kernel modules.
devmatch(8) matchs up devices in the system device tree with drivers
that may match them. For each unattached device in the system, it
tries to find matching PNP info in the linker hints and prints modules
to load to claim the devices.

In --unbound mode, devmatch can look for drivers that have attached to
devices in the device tree and have plug and play information, but for
which no PNP info exists. This helps find drivers that haven't been
converted yet that are in use on this system.

In addition, the ability to dump out linker.hints is provided.

Future commits will add hooks to devd.conf and rc.d to fully automate
using this information.
2017-12-25 18:56:08 +00:00
Alexander Kabaev
96289d0961 Remove write-only opt and useless optlen variables.
This squashes the warning gebnerated by GCC 6.x. Since
variables that are now removed had come documentation
value, put relevant bits in comment, so they can be
resurrected from there when actually needed.
2017-12-24 16:39:57 +00:00
Warner Losh
b68de8941f When -v is specified with -p dev, print the same verbose output as
when listing the whole tree. The list, however, is from the requested
device to the root (so it backwards from the normal tree).

Sponsored by: Netflix
2017-12-21 19:19:43 +00:00
Warner Losh
3ca6eb9faf Fix markup and bump .Dd. 2017-12-21 18:58:14 +00:00
Warner Losh
3386009737 Implement "-p dev" to print the path to the given device back to the
nexus. With redirection, could also be used to test if the device
exists in the device tree.

Sponsored by: Netflix
2017-12-21 18:51:47 +00:00
Pedro F. Giffuni
33d72c30f1 Revert r327005 - SPDX tags for license similar to BSD-2-Clause.
After consultation with SPDX experts and their matching guidelines[1],
the licensing doesn't exactly match the BSD-2-Clause. It yet remains to be
determined if they are equivalent or if there is a recognized license that
matches but it is safer to just revert the tags.

Let this also be a reminder that on FreeBSD, SPDX tags are only advisory
and have no legal value (but IANAL).

Pointyhat to:	pfg
Thanks to:	Rodney Grimes, Gary O'Neall

[1] https://spdx.org/spdx-license-list/matching-guidelines
2017-12-20 20:25:28 +00:00
Pedro F. Giffuni
d17aef79bb SPDX: These are fundamentally BSD-2-Clause.
They just omit the introductory line and numbering.
2017-12-19 22:40:16 +00:00
Baptiste Daroussin
64874a795e newsyslog: Fix issues after r326616
When building the command to execute for compression, newsyslog was modifying
the generic arguments array instead of its own copy.
Meaning on the second file to compress with the same arguments, the command line
was not the one expected.
Fix it by creating one copy of the arguments per execution and modifying that
copy.

While here, print the command line executed in verbose mode.

Reported by:	many
2017-12-18 09:35:04 +00:00
Mark Johnston
3836e3592e Fix a logic bug in makefs lazy inode initialization.
We may need to initialize multiple inode blocks before writing a given
inode. makefs(8) was only initializing a single block at a time, so
certain inode allocation patterns could lead to a situation where it
wrote an inode to an uninitialized block. That inode might be clobbered
by a later initialization, resulting in a filesystem image containing
directory entries that point to a seemingly unused inode.

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D13505
2017-12-16 20:19:00 +00:00
Eugene Grosbein
a2c08ce75b pw(8): r326738 broke expiration arithmetic in case of `-D' flag not supplied.
Fix it and rename misnamed time_t variables `expire_days, password_days'
(always holding absolute time) to `expire_time, password_time'.

Add a comment for a case of overloading `cmdcnf->password_days'
and `cmdcnf->expire_days' with absolute time.

Reported by:	markj
Approved by:	mav (mentor)
MFC after:	1 week
2017-12-15 06:05:16 +00:00
Baptiste Daroussin
b37b09244c Replace usage of fparselen(3) by a getline(3)
This allow to remove the dependency on libutil
2017-12-14 08:57:37 +00:00
Pedro F. Giffuni
9b10f59a10 SPDX: mostly fixes to previous changes.
Introduce the recently approved BSD-1-Clause and replace 0BSD which
never did fit well our use cases.
2017-12-13 16:13:17 +00:00
Warner Losh
155b183ad2 Actually insert the free(d) call missed in r326802.
Noticed by: rpokala@
2017-12-12 19:45:24 +00:00
Warner Losh
96723f5a89 Iniailize str so ucs2_to_utf8 won't free stack garbage.
CID: 1381037
Sponsored by: Netflix
2017-12-12 19:26:28 +00:00
Warner Losh
af934ea3ba Add sanity testing against maximum sane lengths for device paths for
loader and kernel.

CID: 1383608
Sponsored by: Netflix
2017-12-12 19:26:24 +00:00
Warner Losh
a6b6f888b5 Free load_opt_buf after we're done with it.
CID: 1383607
Sponsored by: Netflix
2017-12-12 19:26:19 +00:00
Warner Losh
8354d13d9b Fix resource leak. Free converted description after printing it.
Also minor style sort of local vars.

CID: 1383606
Sponsored by: Netflix
2017-12-12 19:26:15 +00:00
Warner Losh
3af42ca7c1 Don't leak new_data.
CID: 1383605
Sponsored by: Netflix
2017-12-12 19:26:10 +00:00
Warner Losh
c66805a5d5 Check return value for set_bootvar and give a good error message.
CID: 1383601
Sponsored by: Netflix
2017-12-12 19:25:54 +00:00
Warner Losh
6604afe9c7 Unbreak gcc build by using (void) for functions that take no args.
Sponsored by: Netflix
2017-12-11 16:17:53 +00:00
Eugene Grosbein
d30f122fa6 pw(8): correct expiration period handling and command line overrides
to preconfigured values for -e, -p and -w flags.

Use non-negative symbols instead of magic values
in passwd_val/pw_password functions.

PR:		223431
Submitted by:	Yuri Pankov (in part, patch for the manual)
Reported by:	mav (mentor)
MFC after:	3 days
Relnotes:	yes
2017-12-09 23:34:00 +00:00
Niclas Zeising
fba6127915 Improve options and error handling.
Improve options handling and error out if multiple mutually exclusive
options are passed to acpiconf.  Switch from using atoi() to strtol() for
argument parsing, and add error checking and handling, instead of blindly
trusting that the integer conversion is OK.
Cange err() to errx() in once case, the errno value was garbage there.

Reviewed by:	emaste
Approved by:	emaste
Differential Revision:	D13430
2017-12-09 15:59:10 +00:00
Warner Losh
a2aa66719e Indent multiple device path entries correctly.
Sponsored by: Netflix
2017-12-09 07:44:00 +00:00
Warner Losh
1127aea3e7 Remove vestiges of -d and -p commands.
Fix two core dumps when optional data isn't specified.

Sponsored by: Netflix
2017-12-09 07:43:55 +00:00
Warner Losh
a3e6c4a6fc Forgotten in 326725
Release Notes: Yes
2017-12-09 06:57:19 +00:00
Warner Losh
1285bcc833 Import Netflix's efibootmgr to help manage UEFI boot variables
efibootmgr manages the UEFI BootXXXX variables that implement the UEFI
Boot Manager protocol defined in the UEFI standards. It is modeled
after the Linux program of the same name with a mostly compatible set
of command line options. Since there's a fair amount of OS specifioc
code due to differeing names and methods of doing things, the
compatibility isn't 100%.

Basic functionality is implemented, though the more advanced next boot
functionality that's been defined elsewhere is unimplemented.

Submitted by: Matt Williams (with unix / efi path xlate by me)
Sponsored by: Netflix
2017-12-09 06:52:20 +00:00
Nathan Whitehorn
52f39da1f8 Support mounted boot partitions in the installer. This allows the platform
layer, for example, to specify that the EFI boot partition should be
mounted at /efi and formatted normally with newfs_msdos rather than
splatted to from /boot/boot1.efifat.

This commit adds only the API for this; actual platform use will come later.
2017-12-08 00:57:13 +00:00
Baptiste Daroussin
6f80848e09 Really fix typo and improve wording of the comment 2017-12-06 10:47:50 +00:00
Baptiste Daroussin
69f0fc7877 Fix typo
Reported by:	danfe
2017-12-06 10:20:01 +00:00
Baptiste Daroussin
307845dff2 Allow newsyslog to execute compression commands which
have a semantic different than the traditional gzip(1)

This is done to allow to use zstd(1) as a compression tool without
having to patch it to change its default behavior.
2017-12-06 09:44:35 +00:00
Warner Losh
cb37fc82b1 De-const to match changes in userboot.h
Sponsored by: Netflix
2017-12-06 05:18:52 +00:00
Warner Losh
e8e6a5f920 Make putenv and getenv match the userland definition of these
functions, tweak man page and one variable that shouldn't be const
anymore.

Sponsored by: Netflix
2017-12-06 02:00:00 +00:00
Gleb Smirnoff
50387adce2 When parsing remote messages, require them to have standard timestamp
field, and support properly parse out the hostname as described by RFC3164,
which wasn't done before.  However, don't discard message if it doesn't
have hostname, for compatibility.

Enable logging of the message supplied hostname instead of real hostname
with -H switch.

PR:		200933
Reported by:	Konstantin Pavlov <thresh nginx.com>
MFC after:	2 months
2017-12-05 19:54:55 +00:00
Cy Schubert
4451f1426c fdformat is a sysadmin command and thus its man page should be in
volume 8 instead of volume 1.

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D13370
2017-12-05 05:02:46 +00:00
Warner Losh
a2bb1fffdf Add forgotten libgeom.
Sponsored by: Netflix
2017-12-02 15:25:45 +00:00
Warner Losh
693ba58ff6 Add -u (--to-unix) and -e (--to-efi) to convert unix or efi paths to
the other.

Sponsored by: Netflix
2017-12-02 07:29:24 +00:00
Warner Losh
64f77f095e Read multiple lines when parsing the data. Allow multiple device paths
to be read when formatting device paths. Set the upper limit to 64k
(most of these paths are < 64 bytes).

Sponsored by: Netflix
2017-12-02 07:29:07 +00:00
Pedro F. Giffuni
64de3fdd58 SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
Pedro F. Giffuni
8820ecc040 SPDX: Fix some cases wrongly attributed to MIT.
In the cases of BSD-style license variants without clauses, use 0BSD for
the time being in lack of a better description.
2017-11-30 15:10:11 +00:00
Gleb Smirnoff
eb7ec39704 Revert r325558 as it is incorrect. 2017-11-28 19:25:01 +00:00
Gleb Smirnoff
09f876612c Fix obvious NULL pointer dereference from r310350. 2017-11-28 19:18:00 +00:00
Alan Somers
18e980c0e0 diskinfo(8): Delete dead code in slog test
Reported by:	Coverity
CID:		1377556
Reviewed by:	mav
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D13275
2017-11-27 21:10:50 +00:00
Alexander Motin
31c6d7311e Fix integer overflow in SLOG test.
MFC after:	1 week
2017-11-27 20:01:43 +00:00
Ed Maste
f4d8e4954d efivar: add missing getopt 'u' option 2017-11-27 19:35:21 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Pedro F. Giffuni
f0cfa1b168 share and pc-sysinstall: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Commit these apart because compile testing doesn't guarantee I didn't made
some nasty mistake. No functional change intended.
2017-11-27 15:28:26 +00:00
Edward Tomasz Napierala
7acc357f58 .Xr pmcstat(8) from kgmon(8) and gprof(1).
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-27 12:37:14 +00:00
Edward Tomasz Napierala
7ef789791e Revert r326125.
It turns out kgmon(8) still works, and provides some functionality that's
not provided by pmcstat(8).

Reported by:	bde@
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-27 12:34:23 +00:00
Xin LI
483825ed9a Don't assign rs as we will assign it later.
MFC after:	2 weeks
2017-11-27 04:15:03 +00:00
Edward Tomasz Napierala
dd62bb6aeb Mark kgmon(8) obsolete, redirecting users to pmcstat(8).
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12574
2017-11-23 12:41:05 +00:00
Emmanuel Vadot
20d40a56cb bsdinstall: Add ntpdate option
When you install a computer for the first time, the date in the CMOS sometimes
not accurate and you need to ntpdate as ntpd will fail a the time difference
is too big.
Add an option in bsdinstall to enable ntpdate that will do that for us.

Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D13149
2017-11-22 15:27:47 +00:00
Ed Maste
850b25abab Fix indentation in bsdinstall-created wpa_supplicant.conf
r309934 cleaned up some cases in bsdinstall to use heredocs but broke
the indentation of the generated output, because <<- heredocs strip
leading tabs.

PR:		221982
Reviewed by:	allanjude, dteske
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13190
2017-11-22 15:18:11 +00:00
Ed Maste
f6e2146105 freebsd-update: do not duplicate patchlist entries
PR:		221079
Submitted by:	Masachika ISHIZUKA
Submitted by:	ota@j.email.ne.jp
Reviewed by:	cperciva
MFC after:	1 week
2017-11-22 01:50:23 +00:00
Ed Maste
82edb108da vidcontrol: correct history size error message
`vidcontrol -h 0` is acceptable, so be explicit that it's less than zero
that is not allowed.

Reported by:	Siva Mahadevan
Sponsored by:	The FreeBSD Foundation
2017-11-21 13:55:10 +00:00
Warner Losh
c0a0f12f9b This program is more useful if it skips leading whitespace when
parsing a textual UEFI Device Path, since otherwise it things the
passed in path is a filename. While here, reduce the repetition of
8192.

Sponsored by: Netflix
2017-11-21 07:35:29 +00:00
Warner Losh
1c3a0e1a46 Document what the command line arguments actually do. List some of the
size limitations.

Sponsored by: Netflix
2017-11-21 07:35:24 +00:00
Alan Somers
8394104312 periodic: fix exit status for nonexistent arguments
When called with an absolute pathname, periodic should attempt to execute
every script in that directory. If the directory does not exist, it should
print an error and exit 1. Due to a copy/paste mistake in r231568, it exits
0 in that case.

Reported by:	devel/hs-ShellCheck
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D13070
2017-11-20 23:51:51 +00:00
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00