Commit Graph

596 Commits

Author SHA1 Message Date
Mateusz Piotrowski
5475ce6290 bsdinstall(8): Document ZFS installation scripting.
- Extend the bsdinstall(8) man page with ZFS installation scripting
  details. [1]
- Extend the bsdinstall(8) man page with the description of all the ZFS
  variables involved in a scripted installation of ZFS-based systems. [1]
- Extend the SCRIPTING section with an example for a ZFS-based scripted
  installation. [1]
- Create a new section explaining how ZFS datasets must be written into
  a variable to get them set on the final system. [1]

While here:
- Add Roberto to the copyrights for recognition as changes to the manual
  page are huge.
- Use "Dq" for default values.
- Use sysrc(8) instead of echo in examples.

Submitted by:	Roberto Fernandez Cueto <roberfern@gmail.com> [1]
Reviewed by:	dteske
Approved by:	re (gjb), krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D14169
2018-10-04 09:28:40 +00:00
Dag-Erling Smørgrav
c3afb29bb6 Add an installer option to disable destructive dtrace.
Submitted by:		Jörg Pernfuß <code.jpe@gmail.com>
Approved by:		re (kib)
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D12474
2018-09-21 09:27:32 +00:00
Mark Johnston
33a5ef3587 Fix variable name typo in the bsdinstall ttys hardening code.
Submitted by:	Jörg Pernfuß <code.jpe@gmail.com>
Reviewed by:	allanjude, dab, emaste
Approved by:	re (gjb)
Differential Revision:	https://reviews.freebsd.org/D12476
2018-09-20 16:37:50 +00:00
Allan Jude
aa2a0e0fc3 bsdinstall/zfsboot: Enable new UEFI+GELI support
After r336252 it is no longer necessary to have a separate bootpool when
booting from an encrypted disk with UEFI.

This change also switches the EFI System Partition contents from
the 800 KB boot1.efifat to a new 200 MB filesystem created with newfs_msdos
and uses loader.efi directly, instead of boot1.efi.

PR:		228916
Reviewed by:	dteske
MFC after:	1 month
Relnotes:	yes
Sponsored by:	Klara Systems
Differential Revision:	https://reviews.freebsd.org/D12315
2018-08-23 22:50:11 +00:00
Kevin Lo
40bb18ef11 Remove unused MAPDESCFILE. 2018-08-11 14:45:33 +00:00
Justin Hibbits
60f18ad0b4 Add partition scheme for mpc85xx devices
Some mpc85xx devices with u-boot need MBR partitioning with a FAT boot
partition.  Since the infrastructure is already in place to have a dedicated
boot partition, this adds the necessary bits to use that infrastructure with
mpc85xx boards.

Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D15664
2018-06-07 00:24:10 +00:00
Justin Hibbits
fdb600af60 Set kernelname in bootconfig to the kernel file
Summary:
The kernel reads 'kernelname' to set the kern.bootfile sysctl.  By setting this,
'make installkernel' will backup the running kernel as appropriate.

Reviewed by:	nwhitehorn
Differential Revision: https://reviews.freebsd.org/D15660
2018-06-04 14:42:13 +00:00
Nathan Whitehorn
fb4f0dcae9 Use sysrc(8) in the documentation rather than echoing things to rc.conf
in order to encourage good habits.

PR:		228325
Submitted by:	Mateusz Piotrowski
MFC after:	2 weeks
2018-05-18 17:46:40 +00:00
Nathan Whitehorn
8c7de243f4 Fix math error in the computation of the free space after the last partition
on a disk. This resulted in one sector always remaining free at the end.

PR:		bin/228322
Submitted by:	Rikiya Yonemoto
MFC after:	2 weeks
2018-05-18 17:43:15 +00:00
Allan Jude
229c92e7a8 Add the ThinkPad X1 (sandybridge) to the bsdinstall blacklist
MFC after:	2 weeks
Sponsored by:	FOSDEM IllumOS Table
2018-02-04 12:16:36 +00:00
Ed Maste
4a8b3e41f5 bsdinstall: enable SUJ by default (revert r327890)
fsck should be fixed as of r328092.

PR:		225110
Tested by:	dumbbell, Arshan Khanifar <arshankhanifar gmail.com>
2018-01-25 19:57:21 +00:00
Ed Maste
643139e5b1 bsdinstall: disable SUJ by default
SUJ + cg checksums produce spurious warnings after an unclean shutdown
(e.g. a crash).  For now disable SUJ for UFS installs so installing from
a FreeBSD 12 snapshot results in a usable filesystem, until this can be
fixed.

PR:		225110
Submitted by:	Arshan Khanifar <arshankhanifar gmail.com>
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D13890
2018-01-12 20:25: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
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
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
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
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
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
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
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Allan Jude
f78bd12d6d bsdinstall(8) hardening menu: Utilize new kern.randompid=1 behaviour
Enabling the PID randomization option in bsdinstall(8)'s hardening menu
now randomizes the effective value of kern.randompid on each boot.

Previous behaviour:
When kern.randompid was enabled via the the bsdinstall(8) hardening menu,
a random value was generated and placed in the systems /etc/sysctl.conf as
kern.randompid=value
This makes the value of kern.randompid static across reboots.

New behaviour:
When kern.randompid is enabled via the bsdinstall(8) hardening menu, the
line kern.randompid=1 is placed in the systems /etc/sysctl.conf.
This takes advantage of a new kernel feature and makes the value of
kern.randompid be randomized by the kernel on each reboot.

Submitted by:	Marie Helene Kvello-Aune <marieheleneka@gmail.com>
Reviewed by:	des
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D12433
2017-10-02 14:19:31 +00:00
Ravi Pokala
40f0d8dc4a When doing a non-interactive installation, don't display an interactive
warning about a filesystem which doesn't have a mountpoint. Presumably, the
person who wrote the install script knew what they were doing.

Submitted by:	Brian Mueller <bmueller@panasas.com>
MFC after:	1 month
Sponsored by:	Panasas
Differential Revision:	https://reviews.freebsd.org/D12346
2017-09-12 22:19:21 +00:00
Ed Maste
c12530ca4c Ignore error return from newaliases(1)
This was originally added as "exit $SUCCESS" but with nothing to set the
SUCCESS variable. Thus it became an exit with no argument, which just
exits with the status of the preceding command.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-09-11 17:39:21 +00:00
Ed Maste
a230b8a753 bsdinstall: record DHCP config after obtaining lease
Previously we added an ifconfig_$INTERFACE line to rc.conf for each
unsuccessful DCHP attempt.

PR:		219515
Reviewed by:	allanjude
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D11967
2017-08-10 20:26:07 +00:00
Ed Maste
e39a96781e bsdinstall: default to UEFI-only boot on arm64
Reviewed by:	allanjude
Sponsored by:	The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D11721
2017-07-30 23:15:30 +00:00
Bartek Rutkowski
391aafd7ab Remove stack guard option from hardening menu.
Since kib's change the stack guard is now ON by default,
this option in hardening menu of bsdinstall is no longer needed.

Submitted by:	Bartlomiej Rutkowski <robak@FreeBSD.org>
Reviewed by:	bapt
Approved by:	bapt
MFC after:	1 day
Sponsored by:	Pixeware LTD
Differential Revision:	https://reviews.freebsd.org/D11686
2017-07-21 08:50:22 +00:00
Ed Maste
2775c1d7d5 bsdinstall: improve checksum mismatch error for snapshots
The usual case of a mismatched checksum for installer snapshots
(e.g., -CURRENT, -ALPHA*) is that a newer snapshot has been built and
the old install sets have been replaced.  Provide a specific error
message for checksum mismatches there that suggests looking for a newer
snapshot.

Submitted by:	Guangyuan Yang <yzgyyang@outlook.com>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D11641
2017-07-19 18:25:52 +00:00
Ed Maste
9acc904146 bsdinstall: remove EOL whitespace 2017-07-18 23:35:19 +00:00
Bartek Rutkowski
2669f7ebf1 usr.sbin/bsdinstall/scripts/hardening: fix options numbers
Submitted by:	Bartek Rutkowski <robak@FreeBSD.org>
Reviewed by:	bapt
Approved by:	bapt
MFC after:	1 day
Differential Revision:	https://reviews.freebsd.org/D11505
2017-07-06 12:19:15 +00:00
Bartek Rutkowski
82ec242f2e Add option to bsdinstall to disable insecure console, update stack guard option
This patch adds new bsdinstall option to hardening section that allows users
to change this behaviour to secure one and updates stack guard option so it
would set the value of relevant sysctl to 512 (2MB)

Submitted by:	Bartek Rutkowski
Reviewed by:	adrian, bapt, emaste
Approved by:	bapt, emaste
MFC after:	1 day
Sponsored by:	Pixeware LTD
Differential Revision:	https://reviews.freebsd.org/D9700
2017-07-05 13:37:27 +00:00
Steve Wills
d8061eff49 Add hardening menu item for security.bsd.see_jail_proc
Approved by:		allanjude
Differential Revision:	https://reviews.freebsd.org/D11283
2017-06-29 16:39:55 +00:00
Steven Hartland
98b9d3847d Fixed bsdinstall location of vfs.zfs.min_auto_ashift
vfs.zfs.min_auto_ashift is a sysctl only not a tunable so updated bsdinstall
to use the correct location /etc/sysctl.conf instead of /boot/loader.conf

Reported by:	Aaron Caza
Reviewed by:	allanjude
MFC after:	2 days
Sponsored by:	Multiplay
Differential Revision:	https://reviews.freebsd.org/D11278
2017-06-20 08:03:50 +00:00
Ed Maste
c0fcb86aee bsdinstall: correct comment after r320007
Submitted by:	vangyzen
2017-06-16 19:26:33 +00:00
Ed Maste
4ca43ae5f2 bsdinstall: use consistent EFI configuration across platforms
- increase arm64 EFI partition to 200M, as x86
- use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86
- increase ZFS EFI partition to 200M

PR:		201898
Reviewed by:	allanjude, manu
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D11239
2017-06-16 18:58:48 +00:00
Allan Jude
3735bba384 bsdinstall: support Auto ZFS mode for ARM64
Reported by:	Shawn Webb
MFC after:	3 days
2017-06-12 19:31:26 +00:00
Allan Jude
46c380e6db bsdinstall: Make ZFS min_auto_ashift adjustment persistent
Reported by:	feld
Reviewed by:	dteske, tsoome
MFC after:	3 days
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D10895
2017-06-12 19:29:31 +00:00
Enji Cooper
5a7c7dc571 bsdinstall(8): fix manpage issues
- Start new sentences on new lines.
- Separate e.g. (more of an igor thing) with commas, and rewrite some examples
  not to be enclosed in parentheses.

Reported by:	igor, make manlint
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-05-23 08:01:11 +00:00
Enji Cooper
ab9ff47abc sade(8): start new sentence on new line
Reported by:	make manlint
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-05-23 07:50:42 +00:00
Enji Cooper
d6f6b20128 style(9): sort headers
MFC after:	2 weeks
MFC with:	r318693
Sponsored by:	Dell EMC Isilon
2017-05-23 06:05:54 +00:00
Enji Cooper
d547c56fdf Some minor style(9) fixes
- Wrap at <80 columns.
- Sort by type

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-05-23 06:04:38 +00:00
Roger Pau Monné
d7640440fb bsdinstall: do not use distextract in scripted mode
It requires a tty, which might not be available in scripted installs. Instead
extract the sets manually using tar.

Reviewed by:		tsoome
Sponsored by:		Citrix Systems R&D
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D10736
2017-05-22 11:41:17 +00:00
Roger Pau Monné
2f34d6c344 bsdinstall: mount is not needed for the ZFS install case
Because the datasets are already mounted by zfsboot, and the mount script
doesn't know anything about ZFS. Also do not execute the "umount" script for
ZFS for the same reasons.

Reviewed by:		dteske, tsoome
Sponsored by:		Citrix Systems R&D
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D10738
2017-05-22 11:38:39 +00:00
Marcelo Araujo
63128851f3 Use nitems() from sys/param.h.
Reviewed by:	ngie
MFC after:	2 weeks.
Differential Revision:	https://reviews.freebsd.org/D9942
2017-05-03 14:03:46 +00:00
Conrad Meyer
6c546e77b6 bsdinstall(8): Sprinkle a snprintf to fixed size buffer
Use a snprintf to write an environment variable to a fixed-size buffer to
avoid stack overflow.

Reported by:	Coverity (CWE-120)
CID:		1238926
Sponsored by:	Dell EMC Isilon
2017-04-14 00:36:45 +00:00
Bartek Rutkowski
2434a0528a Revert changes introduced in r314036 on demand by jhb and bapt.
Approved by:	bapt, jhb
2017-03-17 11:45:46 +00:00
Rodney W. Grimes
ce9f2d31b3 Convert absolute links to relative links.
Style.Makefile(9) has been ignored to produce minimal diffs.

Approved by:	grehan (mentor)
MFC after:	1 week
2017-03-07 05:10:38 +00:00
Bartek Rutkowski
4bf41040fd Enable bsdinstall hardening options by default.
As discussed previously, in order to introduce new OS hardening
defaults, we've added them to bsdinstall in 'off by default' mode.
It has been there for a while, so the next step is to change them
to 'on by defaul' mode, so that in future we could simply enable
them in base OS.

Reviewed by:	brd
Approved by:	adrian
Differential Revision:	https://reviews.freebsd.org/D9641
2017-02-21 09:37:33 +00:00
Bartek Rutkowski
955255728c Add 0-8 as shortcuts for jumping to menu items in the hardening menu.
Submitted by:	skreuzer
Reviewed by:	allanjude, robak
Approved by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D6826
2017-02-16 19:58:02 +00:00
Renato Botelho
371ce0ebc2 bsdinstall: Make sure chroot filesystems are umounted after use
* DISTDIR_IS_UNIONFS is set every time BSDINSTALL_DISTDIR is mounted inside
  BSDINSTALL_CHROOT. Use this flag to decide if it needs to be umounted
* BSDINSTALL_CHROOT/dev is mounted when 'bsdinstall mount' is called, there is
  no need to mount it again when user goes to shell after installation

Reviewed by:	allanjude
Obtained from:	pfSense
MFC after:	1 week
Sponsored by:	Rubicon Communications (Netgate)
Differential Revision:	https://reviews.freebsd.org/D8573
2017-02-08 17:03:52 +00:00
Ravi Pokala
0ee82391df Fix indentation (only line in file w/ 8-space indent rather than hard-tab).
MFH:		1 week
2017-02-08 00:02:54 +00:00
Yoshihiro Takahashi
2b375b4edd Remove pc98 support completely.
I thank all developers and contributors for pc98.

Relnotes:	yes
2017-01-28 02:22:15 +00:00
Devin Teske
a7cc56803c Revert r309918 -- modern POSIX has deprecated -<#>/+<#> syntax
Special thanks to:	jilles
2016-12-13 22:31:49 +00:00
Devin Teske
f3a8471e5f It's completely pointless to replace newlines with space
(this is done automatically for you upon shell expansion)
2016-12-13 02:56:52 +00:00
Devin Teske
be094a3204 The flags of a WLAN need to be quoted (they contain things like brackets) 2016-12-13 02:54:44 +00:00
Devin Teske
19dbb0ba18 Simplify single-line if statements 2016-12-13 02:48:14 +00:00
Devin Teske
afcce2f52d Simplify loop by moving predicate to clause 2016-12-13 02:47:39 +00:00
Devin Teske
b46ca7cefe Wordsmithing 2016-12-13 02:46:36 +00:00
Devin Teske
a9d334210f Why test $? when you can test the command 2016-12-13 02:45:52 +00:00
Devin Teske
6ef8ca674f Restore previous comment 2016-12-13 02:45:07 +00:00
Devin Teske
94f5aec600 Both simplify bringup of interface after changes and catch errors in debug 2016-12-13 02:44:33 +00:00
Devin Teske
b9f60aba8b Calculate proper size of menu list dialog 2016-12-13 02:42:10 +00:00
Devin Teske
9a46c67aed There's an API function for catching errors and displaying them or
logging them to debug output
2016-12-13 02:40:54 +00:00
Devin Teske
7e1166de96 There's an API function for displaying pauses 2016-12-13 02:30:24 +00:00
Devin Teske
d79a135578 There's an API function for displaying yes/no dialogs 2016-12-13 02:29:20 +00:00
Devin Teske
1d92999c48 There's an API function for displaying errors 2016-12-13 02:27:38 +00:00
Devin Teske
35af83c188 Comment 2016-12-13 02:25:23 +00:00
Devin Teske
b45548a80e Whitespace alignment 2016-12-13 02:23:48 +00:00
Devin Teske
d5fddc4dcb Relying on dialog auto-sizing (width/height/rows = 0) is a mistake
Use the provided API for calculating the appropriate size of menus
2016-12-13 02:22:21 +00:00
Devin Teske
7599c85424 Remove unnecessary quotes 2016-12-13 02:16:00 +00:00
Devin Teske
1095816ec3 Add missing quotes 2016-12-13 02:15:36 +00:00
Devin Teske
01a2404c35 In awk, if you're going to append a newline to your printf
AND you're going to print only the argument, just use print
2016-12-13 02:14:40 +00:00
Devin Teske
dba958af5d This statement has too many backslashes 2016-12-13 02:13:20 +00:00
Devin Teske
be34885e2a Neither printf (and as is commonly known) nor print need parens in awk 2016-12-13 02:12:00 +00:00
Devin Teske
5943bcd19f Whitespace and alignment 2016-12-13 02:11:09 +00:00
Devin Teske
191441eed8 You don't need parentheses for awk's printf 2016-12-13 02:07:12 +00:00
Devin Teske
0724c87c95 Continued resolution of conveluted statement
We shouldn't be coding things like "x || (x && x) || x || x || x ..."
2016-12-13 02:04:50 +00:00
Devin Teske
32c34b0361 These two error messages have always been backwards since inception 2016-12-13 02:02:14 +00:00
Devin Teske
7f513d3675 Why use $? when you can use the command itself 2016-12-13 01:59:35 +00:00
Devin Teske
6b77f63e5d If the first ping succeeded, why on Earth should we ping it again? 2016-12-13 01:56:28 +00:00
Devin Teske
a1a6fec1c7 Start deconstructing a conveluted hunk of code 2016-12-13 01:54:44 +00:00
Devin Teske
19cae84e23 Remove completely unnecesary parentheses 2016-12-13 01:52:10 +00:00
Devin Teske
751993945a Why repeat yourself when you can send stderr to the same place as stdout? 2016-12-13 01:50:22 +00:00
Devin Teske
66ef7d9455 Properly quote variable 2016-12-13 01:44:18 +00:00
Devin Teske
a51195769a Use more generic f_yesno() from provided API 2016-12-13 01:42:13 +00:00
Devin Teske
f52733d46e The output of dialog needs to be sanitized
for portability/compatibility requirements
2016-12-13 01:41:06 +00:00
Devin Teske
f20b7768fc Whitespace alignment 2016-12-13 01:39:09 +00:00
Devin Teske
d401d36c04 Sort the domains 2016-12-13 01:36:46 +00:00
Devin Teske
95ee591e83 The --no-items and --stdout options are non-standard and should be avoided
From the dialog(1) manual:
using [--stdout] in portable scripts is not recommended
2016-12-13 01:35:26 +00:00
Devin Teske
6e038cc2eb More efficiently make use of the exit status 2016-12-13 00:27:56 +00:00
Devin Teske
1c61211223 Stop repeating strings (centralize prompt string)
NB: Changes to strings now only affect a single line
2016-12-13 00:22:01 +00:00
Devin Teske
e2577019ed Add missing backslash (no real effect; it's pedantic and correct for
the interpolation level)
2016-12-13 00:18:51 +00:00
Devin Teske
e7f2eb12c2 Use the oft-neglected awk syntax "startcondition, stopcondition { ... }" to
process the range of country labels which appear as columnar list from the
"ifconfig DEV list countries" command. Not only improving maintainability,
but also properly encapsulating arguments in single-quotes instead of
trying to escape whitespace. It is also completely unnecessary to collapse
newlines into whitespace (shell will do this for you automatically upon
expansion of the contents where necessary).

NB: This also changes the sorting algorithm to sort on the country code,
not the country name. The type-ahead feature of dialog is destroyed if the
tags are not sorted properly.
2016-12-13 00:02:59 +00:00
Devin Teske
49748e0a6d Quote WLAN_IFACE (pedantic) 2016-12-12 22:57:07 +00:00
Devin Teske
6c26775c2f In awk, casting a variable as a boolean condition is the same as testing if
the length of the variable contents is greater than zero

This allows us to also move the secondary condition into the action clause
2016-12-12 21:29:48 +00:00
Devin Teske
275c0c0741 Remove an unnecessary call to f_dialog_title_restore() 2016-12-12 21:27:29 +00:00
Devin Teske
1045858386 Whitespace 2016-12-12 21:26:36 +00:00
Devin Teske
d124dfc410 Utilize provided i18n strings 2016-12-12 21:23:47 +00:00
Devin Teske
877ea04721 Remove incomplete and unnecessary creation of fd3
The provided API already provides a passthru descriptor and even
gives you a varaible for referring to it.
2016-12-12 21:20:56 +00:00
Devin Teske
8bcf564644 Remove unnecessary semi-colons 2016-12-12 21:18:24 +00:00
Devin Teske
0b8f01fe99 Use awk the following (more succinct) awk syntax:
condition1 { action1 }
	condition2 { action2 }

instead of the following syntax:

	{
		if (condition1) { action1 }
		else if (condition2) { action2 }
	}
2016-12-12 21:16:37 +00:00
Devin Teske
d9f83eb9f4 1 is the default descriptor for redirects without an fd prefix 2016-12-12 21:11:55 +00:00
Devin Teske
bef42d18c5 Fix invalid parameter expansion (change $@ to "$@")
Without quotes, $@ loses its special meanining (see below)

% sh -c 'echo $@' /bin/sh "   1   " "   2   "
1 2
% sh -c 'echo "$@"' /bin/sh "   1   " "   2   "
   1       2

The quotes are required to get ARGV to be unperterped
2016-12-12 21:04:11 +00:00
Devin Teske
35c8d5eb1b Allow the script path to contain whitespace and special characters 2016-12-12 21:01:20 +00:00
Devin Teske
58ce2edc98 Use provided API to centralize dialog title strings 2016-12-12 21:00:09 +00:00
Devin Teske
7797a5973f Reorder dialog parameters based on commonality for readability 2016-12-12 20:54:20 +00:00
Devin Teske
6ea6e3fa7d Fix incorrect use of provided API
The result of which was incorrectly sized menu dialogs
2016-12-12 20:49:49 +00:00
Devin Teske
ea2e60b01c Use provided API (change "dialog" to "$DIALOG") 2016-12-12 20:43:09 +00:00
Devin Teske
2abc4c242e Whitespace (dialog options separated to minimize diffs) 2016-12-12 20:41:27 +00:00
Devin Teske
b5938e7da3 Consolidate redirects into here documents, with proper code indentation 2016-12-12 19:46:49 +00:00
Devin Teske
15fadc4858 Remove an unnecessary "return $?" at end of function 2016-12-12 19:26:55 +00:00
Devin Teske
7bcf4508be Use ternary operator 2016-12-12 19:24:32 +00:00
Devin Teske
0e638f57e6 If you're not going to make use of the products of a match() in awk
(e.g., RSTART and RLENGTH variables) then use ~ instead of match()
2016-12-12 19:12:31 +00:00
Devin Teske
71ef4d586a Now that these variables do not contain the --default-item flag itself,
change the name of the variable from $def_item_... to $default_...
2016-12-12 19:10:39 +00:00
Devin Teske
86e1d2977f Always pass --default-item parameter to dialog 2016-12-12 19:09:17 +00:00
Devin Teske
48e9fce2f5 There is zero harm in always passing --default-item to dialog 2016-12-12 19:07:42 +00:00
Devin Teske
58dc38bd1c Centralize backtitle string 2016-12-12 19:01:04 +00:00
Devin Teske
5357f8f7c8 Use provided API instead of hard-coded status integers 2016-12-12 18:55:41 +00:00
Devin Teske
76b07bd950 Whitespace 2016-12-12 18:52:22 +00:00
Devin Teske
9ca8b7be34 Remove unnecessary `-n' parameter to head/tail 2016-12-12 18:48:00 +00:00
Devin Teske
3204364296 awk(1) match() takes a regex, use /.../ to remind ourselves of this
NB: The difference between "..." and /.../ for a regex in awk is that
quoted strings go through escape expansion first (e.g., \\ becomes \)
2016-12-12 18:45:52 +00:00
Devin Teske
4fa8c81cc3 Be internally consistent (": > ..." is used elsewhere in this file) 2016-12-12 18:43:42 +00:00
Devin Teske
edcf330372 "echo | sed | sed | awk" is silly (changed to "echo | awk") 2016-12-12 18:42:55 +00:00
Devin Teske
1cac9fc2a3 Add missing `-e' parameter to sed invocations 2016-12-12 18:39:26 +00:00
Devin Teske
8d5182d698 Allow $BSDINSTALL_TMPETC to contain whitespace or special chars 2016-12-12 18:38:18 +00:00
Devin Teske
c62801e26d Group fallbacks together 2016-12-12 18:34:21 +00:00
Devin Teske
0b04945dc0 Remove unnecessary quotes around number in test 2016-12-12 18:33:40 +00:00
Devin Teske
e9c843adc7 Change "[ ! ... ] && ..." to "[ ... ] || ..." 2016-12-12 18:29:24 +00:00
Devin Teske
e20253348d Collapse tiny if statements 2016-12-12 18:28:20 +00:00
Devin Teske
114a587e3b Replace funny block with something easy to digest 2016-12-12 18:24:41 +00:00
Devin Teske
bede070805 Consolidate locals 2016-12-12 18:21:56 +00:00
Devin Teske
5b57fabb45 Remove unnecessary local initializers 2016-12-12 18:20:56 +00:00
Devin Teske
38a9942347 Change "[ ! -z ... ]" => "[ ... ]" and "[ -z ... ]" => "[ ! ... ]" 2016-12-12 18:17:30 +00:00
Devin Teske
138ab67af4 Use $( ... ) instead of ... 2016-12-12 18:10:33 +00:00
Devin Teske
97a4c9f0dc Comments 2016-12-12 18:05:54 +00:00
Devin Teske
f18789d787 Functions in their own section 2016-12-08 19:28:12 +00:00
Devin Teske
3d2b0857bf Remove unnecessary trailing backslashes 2016-12-08 19:26:22 +00:00
Devin Teske
3220bdd85c Add support for "hidden" Wi-Fi networks
PR:		bin/214933
Submitted by:	Maxim Filimonov <che@bein.link>
Reviewed by:	dteske, allanjude, adrian
MFC after:	6 days
X-MFC-with:	Follow-up commit for style
2016-12-08 16:41:18 +00:00
Wojciech Macek
e24e98d090 bsdinstall: add warning when unsupported partition is modified
Right now is possible to modify bootable partition type to
non-bootable type without getting warning from partedit.
Example: if you auto parition drive for arm64, you will
get freebsd-ufs as bootable partition; now you are able
to change bootable partition type to freebsd-zfs; there
will be no warning and the system will install but
will not be bootable afterwards.

After this fix, partedit will issue the same warning it
does when user attempts to create bootable partition of
not supported type, notyfing a user about incoming
problem and allowing to think the decision over before
commiting the schema.

This has been tested on amd64 and arm64.

Obtained from:         Semihalf
Submitted by:          Dominik Ermel <der@semihalf.com>
Sponsored by:          Cavium
Reviewed by:           nwhitehorn
Differential Revision: https://reviews.freebsd.org/D6879
2016-09-05 08:42:36 +00:00
Dag-Erling Smørgrav
47ead00d5b Ensure that the sector size is a multiple of 4096 to avoid creating
unaligned partitions when the actual sector size is hidden from us.

PR:		211361
MFC after:	3 days
2016-08-15 09:30:21 +00:00
Steven Kreuzer
1d01cb0d72 Write kern.randompid to /etc/sysctl.conf
PR:		211471
Reported by:	survo@protonmail.com
Reviewed by:	robak@
Approved by:	allanjude@
MFC after:	3 days
Differential Revision:	 https://reviews.freebsd.org/D7440
2016-08-09 15:57:37 +00:00
Dimitry Andric
7212134272 Fix non-functional bsdinstall services dialog.
The most recent version of bsdinstall does not seem to respect any of
the checkboxes in the "Choose the services you would like to be started
at boot" dialog.  None of the chosen services end up in the rc.conf file
that is installed onto the target system.

This is caused by the bsdinstall/scripts/hardening script, which
implements the new hardening options dialog.  The script starts by
overwriting the previously written rc.conf.services file:

    echo -n > $BSDINSTALL_TMPETC/rc.conf.services

which is obviously incorrect.  It should clear out rc.conf.hardening
instead.

Reviewed by:	allanjude
PR:		211506
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D7387
2016-08-01 19:49:42 +00:00
Allan Jude
1b63cafb63 A failed installation once restarted will often error out
If an encrypted install is attempted and fails for any reason, the disk
cannot be erased by the installer because the partition is in use by GELI

At the start of the installation process, all ZFS pools are exported and
all GELI instances are detached, to allow a restarted install to proceed

PR:		210814
Reported by:	jonathan
MFC after:	10 days
2016-07-16 19:35:04 +00:00
Allan Jude
4487af02ff Fix encrypted MBR install
The pools are exported and reimported in order to write the bootcode
This causes an error when the bootpool is later mounted by common code
The bootpool is now imported with the -N flag to prevent mounting

Reported by:	Michael Dexter
MFC after:	5 days
2016-07-16 18:28:44 +00:00
Bartek Rutkowski
0e3f233f51 Add new System Hardening menu and options to bsdinstall.
This patch add new 'hardening' file responsible for new bsdinstall
'System Hardening' menu allowing users to set some sane and carefully
picked system security options (like random process id's, hiding
other users/groups processes and others).

All options are OFF by default in this patch due to POLA principle
with intention to turn change some of them to ON by default in future.

Reviewed by:	adrian, allanjude, bdrewery, nwhitehorn
Approved by:	adrian, allanjude
MFC after:	7 days
2016-07-15 15:07:24 +00:00
Allan Jude
d4e5caaf7d Make the new 'set date and time' dialog default to skip
X-MFC-With:	302790
Requested by:	nwhitehorn
2016-07-14 00:41:19 +00:00
Allan Jude
09c4000afe bsdinstall: Prompt user to set the date and time after selecting timezone
Not having the correct date and time makes many PKI based things not work

In 10 and 11, it can mean that Unbound, ntpd, and sshd won't start

Submitted by:	des (original patch)
MFC after:	7 days
2016-07-13 23:49:45 +00:00
Allan Jude
e302644618 Add more machines to the bsdinstall workaround blacklist
Apply the LenovoFix (fake partition in pMBR is 2nd rather than 1st)
and GPT Active fix (mark the fake pMBR partition active) to respective
hardware that is confirmed to require such to boot correct.

Submitted by:	Sam Fourman Jr. <sfourman@gmail.com> (ThinkPad W520)
Submitted by:	Matthias Apitz <guru@unixarea.de> (Latitude E6330)
Approved by:	re (gjb)
Sponsored by:	ScaleEngine Inc.
2016-07-03 01:23:38 +00:00
Allan Jude
ca13d5d23a Fix an error in bsdinstall when ZFS installation uses a bootpool
A separate bootpool is used when the selected partition type is MBR
or when the disk is GELI encrypted and a UEFI loader is selected.

BIOS avoids the bootpool by using bootcode and loader that support GELI.

bsdinstall did not remount the bootpool after creating the main pool,
which caused an error when mkdir tried to create /boot/zfs

PR:		210717
Approved by:	re (gjb)
Sponsored by:	ScaleEngine Inc.
2016-07-03 01:22:59 +00:00
Ed Maste
5fafcca757 bsdinstall: increase EFI partition size to 200MB
A larger EFI file system size will facilitate multi-boot configurations
and the installation other EFI applications like firmware update tools.
200MB matches OS X.

Note that this changes only the partition size, not the file system that
bsdinstall places there. We need to do both, but as the partition size
is difficult to adjust later make this change for now so that at least
systems installed with FreeBSD 11.0 have a partition layout with room
to grow.

Reviewed by:	allanjude, imp
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6935
2016-06-23 18:04:48 +00:00
Wojciech Macek
0fbcaf7657 ARM64: bsdinstall support for creating EFI partitions
This patch enables bsdinstall to create EFI partition during installation and uploading it's contents,
    making the ARM64 FreeBSD installation bootable.

    Obtained from:         Semihalf
    Sponsored by:          Cavium
    Approved by:           re
    Reviewed by:           allanjude, emaste, nwhitehorn, wma
    Differential Revision: https://reviews.freebsd.org/D6853
2016-06-20 06:40:58 +00:00
Allan Jude
52fffe9307 Fix bsdinstall for root-on-zfs with MBR partitioning
Fix an error where vfs.root.mountfrom was not always set as required
when creating a bootpool. After the recent geliboot changes, it was only
set if the main pool was encrypted.

Also resolve an error where the bootpool was unmounted twice causing
bsdinstall to stop with an error message about the failed command.

Approved by:	re (gjb)
Sponsored by:	BSDCan Hacker Lounge
2016-06-10 14:31:59 +00:00
Andriy Voskoboinyk
4913f849ab bsdinstall: add country/regulatory domain configuration dialog.
Allow to setup country and/or regulatory domain before scanning
(since channel list is affected by regulatory restrictions this may
impact scan results).

PR:		182600 (originally)
Differential Revision:	https://reviews.freebsd.org/D6325
2016-06-08 20:42:35 +00:00
Andriy Voskoboinyk
fb82771908 bsdinstall: unbreak static address assignment for wired networks.
This fixes regression introduced in r298946 (fixes static address
assignment for wireless networks).

Reported & submitted by:	allanjude
2016-05-26 11:58:36 +00:00
Allan Jude
24d17f1e24 Only set kern.geom.part.mbr.enforce_chs=0 once, instead of once per disk
Sponsored by:	ScaleEngine Inc.
2016-05-24 00:23:39 +00:00
Allan Jude
bb4fd0a0d1 Add support for RAID 1+0 (striped mirrors) to bsdinstall/zfsboot
Sponsored by:	ScaleEngine Inc.
2016-05-24 00:22:29 +00:00
Allan Jude
b06bc65e71 Only export and re-import the root pool if installing on MBR
This step is required in order to dd the boot2 bits into the ZFS partition

Sponsored by:	ScaleEngine Inc.
2016-05-23 17:04:13 +00:00
Allan Jude
7289f18f78 Fix missing pool name in zfs set command 2016-05-23 16:49:26 +00:00
Allan Jude
dcf362194d Fix error in bsdinstall where additional filesystems cannot be mounted
Do not set canmount=noauto on the boot environment at create time, because
this causes / to not be mounted, and since the chroot is read only, new
mountpoints cannot be created.

The property is set later, when other properties are adjusted

Reported by:	HardenedBSD
Sponsored by:	ScaleEngine Inc.
2016-05-23 15:11:01 +00:00
Allan Jude
a1b8f55c77 bsdinstall/zfsboot GPT+BIOS+GELI installs now make use of GELIBOOT
In this configuration, a separate bootpool is not required.
This allows ZFS Boot Environments to be used with GELI encrypted ZFS pools.

Support for GPT+EFI+GELI is planned for the future.

Tested by: Joseph Mingrone, HardenedBSD
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D5869
2016-05-22 20:31:52 +00:00
Allan Jude
595568b58b Fix default ZFS layout to work better by default with sysutils/beadm
The root file system is mounted early via vfs.root.mountfrom.
The canmount=noauto property only affects the zfs rc.d script.
This ensures that the 'default' BE is not mounted overtop of another BE when
one is selected from the beastie menu

Sponsored by:	ScaleEngine Inc.
2016-05-22 16:24:21 +00:00
Baptiste Daroussin
5e38260c4f Fix typo in comments for the zfsboot script
Submitted by:	Colby Swandale <colby@taplaboratories.com.au> (via github)
2016-05-22 12:59:07 +00:00
Allan Jude
06445fc0fa bsdinstall/zfsboot: Do not mirror swap when swapsize is 0
PR:		209415
Submitted by:	Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after:	2 weeks
2016-05-10 14:38:43 +00:00
Andriy Voskoboinyk
6d8e01b078 bsdinstall: fix static address assignment for protected wireless networks.
Filter out IFCONFIG_PREFIX variable (which may contain WPA keyword)
from ifconfig parameters.

PR:		169199
2016-05-02 21:40:34 +00:00
Pedro F. Giffuni
ec65e4f8d0 usr.sbin/bsdconfig: minor spelling fixes on comments.
No functional change.
2016-05-01 16:38:12 +00:00
Ed Schouten
4e7e2cad09 Remove unportable calls to basename().
The POSIX version of basename() doesn't use a 'const char *' argument;
the function may overwrite its input buffer. Instead of copying the
input string, let's just simplify this code by using our getprogname()
function that already returns the name of the application in the right
format.

Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D6094
2016-04-26 10:04:06 +00:00
Allan Jude
4d41f47272 Add a new installation type to bsdinstall/zfsboot: BIOS+UEFI
Installs both pmbr+gptzfsboot as well as boot1.efifat in separate partitions
The resulting system can be booted with either UEFI or BIOS/CSM.
Preference is controlled by the user's firmware boot settings.

This is now the default for zfsboot installs

PR:		208629
Submitted by:	Galael LAPLANCHE <ganael.laplanche@corp.ovh.com> (original version)
2016-04-19 03:25:36 +00:00
Glen Barber
876d357fa7 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-11 15:24:59 +00:00
Allan Jude
b3f7b13945 bsdinstall/zfsboot should create /tmp and /var/tmp if they do not exist
PR:		208629
PR:		208568
Submitted by:	Galael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after:	2 weeks
2016-04-08 15:08:22 +00:00
Allan Jude
6b5e33ba48 Do not add swap to fstab when swapsize is 0
If a user requested encrypted swap, but 0 sized, it would still be added to fstab

PR:		208630
Submitted by:	Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
2016-04-08 15:05:06 +00:00
Glen Barber
d60840138f MFH
Sponsored by:	The FreeBSD Foundation
2016-04-04 23:55:32 +00:00
Allan Jude
6203e46b84 Remove 50% ZFS conditional from bsdinstall/zfsboot
Remove the requirement that the resulting partition table be atleast 50% ZFS

PR:		208094
Requested by:	brooks
Sponsored by:	ScaleEngine Inc.
2016-03-17 17:53:38 +00:00
Glen Barber
221b349912 MFH
Sponsored by:	The FreeBSD Foundation
2016-02-02 22:27:48 +00:00
Allan Jude
0edc8cc831 The zfsboot automated part of bsdinstall now supports UEFI
MFC after:	3 days
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D4960
2016-01-30 15:53:28 +00:00
Glen Barber
59d43d11fe MFH
Sponsored by:	The FreeBSD Foundation
2016-01-20 09:50:54 +00:00
Allan Jude
a94af9543d Never 4k align the MBR bootpool because zfsldr can not deal with a gap
If the bootpool does not start at the first sector of the BSD partition
then zfsldr seeks to the wrong offset inside the ZFS vdev label, and is
unable to find zfsboot, so the system does not boot

If 4k alignment is requested, align the BSD partition in the MBR table,
and align the swap and data pool, but the bootpool must start at sector 1

While here, if 4k alignment is requested, disable MBR CHS alignment, as
this results in not-4k aligned partitions.

Reported by:	Alex Wilkinson
MFC after:	5 days
Sponsored by:	ScaleEngine Inc.
2016-01-16 19:25:16 +00:00
Glen Barber
a11378bd93 MFH
Sponsored by:	The FreeBSD Foundation
2016-01-14 13:29:12 +00:00
Eric van Gyzen
50d901977a bsdinstall: Suggest the GPT+Active workaround on Dell T5810
The Dell Precision Tower 5810 fails to boot from GPT in Legacy/BIOS mode
without the Active flag in the Protective MBR.  Suggest the workaround
during installation.

Since an increasing number of Dell systems exhibit this behavior,
I imagine all Dells past a certain date will do so.  I would like
to suggest the workaround for all Dells with a BIOS date of, say,
2014 or later, but I would need to test a variety of systems before
committing such a change.

Reviewed by:	allanjude, dteske
MFC after:	5 days
Relnotes:	We should probably suggest using GPT+Active on "recent" Dells.
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D4075
2016-01-14 00:31:00 +00:00
Glen Barber
1a5c9277ca MFH
Sponsored by:	The FreeBSD Foundation
2016-01-05 21:12:49 +00:00
Glen Barber
8834318685 Merge ^/projects/release-install-debug:
- Rework MANIFEST generation and parsing via bsdinstall(8).
- Allow selecting debugging distribution sets during install.
- Rework bsdinstall(8) to fetch remote debug distribution sets
  when they are not available on the local install medium.
- Allow selecting additional non-GENERIC kernels during install.
  At present, GENERIC is still required, and installed by default.

Tested with:	head@r293203
Sponsored by:	The FreeBSD Foundation
2016-01-05 21:05:17 +00:00
Glen Barber
b626f5a73a MFH r289384-r293170
Sponsored by:	The FreeBSD Foundation
2016-01-04 19:19:48 +00:00
Devin Teske
ed27536fd5 Explicitly set permissions on entropy files
Differential Revision:	https://reviews.freebsd.org/D3933
Submitted by:	jmg
Reviewed by:	delphij, markm
Approved by:	secteam (delphij)
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-12-28 17:27:20 +00:00
Nathan Whitehorn
159ca5c844 Adapt to new wireless scheme where base wlan interfaces do not show up in
ifconfig anymore.
2015-12-06 00:20:45 +00:00
Bryan Drewery
7fdd45b091 Use LIBEXECDIR for /usr/libexec.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-11-26 01:14:40 +00:00
Devin Teske
e4e2a6c642 Fix typo in error message
Differential Revision:	https://reviews.freebsd.org/D3997
Submitted by:	git_johnko.ca (John Ko)
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-11-03 21:19:46 +00:00
Baptiste Daroussin
5a2b666ce5 Merge from head 2015-10-01 09:36:43 +00:00
Bryan Drewery
595fe15108 Add more SUBDIR_PARALLEL.
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 14:13:51 +00:00
Bryan Drewery
ec766071e3 META_MODE: Remove DEP_MACHINE from Makefile.depend files.
This has not been needed since r246865 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:44:01 +00:00
Bryan Drewery
54c7d75a06 META_MODE: Remove DEP_RELDIR from Makefile.depend files.
This has not been needed since r284171 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:26:08 +00:00
Allan Jude
4c95e76ac4 Add a number of models to the bsdinstall GPT hack blacklist
PR:		194359
Approved by:	bapt (mentor)
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3525
2015-09-16 03:32:27 +00:00
Baptiste Daroussin
f94594b37a Finish merging from head, messed up in previous attempt 2015-09-12 12:03:02 +00:00
Baptiste Daroussin
b5ff185e19 Merge from head 2015-09-12 11:41:31 +00:00
Devin Teske
65f3614085 Replace `return' outside of function with exit
MFC after:	3 days
X-MFC-to:	stable/10
Pointy hat to:	me
2015-09-11 21:18:21 +00:00
Devin Teske
0a8354938c Use a variable for readability
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:14:48 +00:00
Devin Teske
e5a24129fa Update copyright
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:13:34 +00:00
Devin Teske
96eeaba5b1 Better to reset trap and explicitly exit success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:12:41 +00:00
Devin Teske
521414ebc7 Remove trailing newline at EOF
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:09:39 +00:00
Devin Teske
5e1ed71e4f Produce meaningful exit code
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:08:46 +00:00
Devin Teske
1a8cf17d01 Explicitly exit with success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:01:26 +00:00