summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2015-01-11 22:34:08 +0000
committerespie <espie@openbsd.org>2015-01-11 22:34:08 +0000
commit8205cf658d53e4ab271515bd1c17cba153c85bae (patch)
treee1569fab152bff4e92d350ef7e56cb546cd1c4d3
parentRemove orphaned defines. (diff)
downloadwireguard-openbsd-8205cf658d53e4ab271515bd1c17cba153c85bae.tar.xz
wireguard-openbsd-8205cf658d53e4ab271515bd1c17cba153c85bae.zip
replace fw_update (shell script) with a specialized version of pkg_add.
This has numerous advantages, in terms of speed and control. Initial version should be (mostly) identical to the old one. thanks to rpe@ and sthen@ for tests.
-rw-r--r--usr.sbin/Makefile4
-rw-r--r--usr.sbin/pkg_add/Makefile8
-rw-r--r--usr.sbin/pkg_add/fw_update.190
3 files changed, 97 insertions, 5 deletions
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index c2a5e19a93d..b6f1863506a 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -1,11 +1,11 @@
-# $OpenBSD: Makefile,v 1.184 2014/12/03 20:13:49 florian Exp $
+# $OpenBSD: Makefile,v 1.185 2015/01/11 22:34:08 espie Exp $
.include <bsd.own.mk>
SUBDIR= ac accton acpidump adduser amd apm apmd arp \
authpf bgpctl bgpd bind chroot config cron crunchgen dev_mkdb \
dhcpd dhcrelay dvmrpctl dvmrpd edquota eeprom fdformat \
- ftp-proxy fw_update gpioctl hostapd hotplugd httpd identd ifstated \
+ ftp-proxy gpioctl hostapd hotplugd httpd identd ifstated \
ikectl inetd installboot iostat iscsictl iscsid kgmon kvm_mkdb \
ldapd ldapctl ldomctl ldomd ldpd ldpctl lpr mailwrapper map-mbone \
memconfig mksuncd mkuboot mopd mrinfo mrouted \
diff --git a/usr.sbin/pkg_add/Makefile b/usr.sbin/pkg_add/Makefile
index 22fb9c82698..cca6735ac74 100644
--- a/usr.sbin/pkg_add/Makefile
+++ b/usr.sbin/pkg_add/Makefile
@@ -1,8 +1,9 @@
-# $OpenBSD: Makefile,v 1.84 2014/12/27 23:59:44 espie Exp $
+# $OpenBSD: Makefile,v 1.85 2015/01/11 22:34:08 espie Exp $
.include <bsd.own.mk>
-MAN1=pkg_add.1 pkg_info.1 pkg_create.1 pkg_delete.1 pkg_mklocatedb.1 pkg_sign.1
+MAN1=fw_update.1 pkg_add.1 pkg_info.1 pkg_create.1 pkg_delete.1 \
+ pkg_mklocatedb.1 pkg_sign.1
MAN5=package.5 pkg.conf.5
MAN8=pkg_check.8
MAN=${MAN1} ${MAN5} ${MAN8}
@@ -82,7 +83,8 @@ SCRIPTS_LNK = \
pkg_add pkg_create \
pkg_add pkg_delete \
pkg_add pkg_info \
- pkg_add pkg_sign
+ pkg_add pkg_sign \
+ pkg_add fw_update
LIBBASE=/usr/libdata/perl5
diff --git a/usr.sbin/pkg_add/fw_update.1 b/usr.sbin/pkg_add/fw_update.1
new file mode 100644
index 00000000000..793615f3493
--- /dev/null
+++ b/usr.sbin/pkg_add/fw_update.1
@@ -0,0 +1,90 @@
+.\" $OpenBSD: fw_update.1,v 1.1 2015/01/11 22:34:08 espie Exp $
+.\"
+.\" Copyright (c) 2011 Alexander Hall <alexander@beard.se>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: January 11 2015 $
+.Dt FW_UPDATE 1
+.Os
+.Sh NAME
+.Nm fw_update
+.Nd install non-free firmware packages
+.Sh SYNOPSIS
+.Nm
+.Op Fl adnv
+.Op Fl p Ar path
+.Op Ar driver ...
+.Sh DESCRIPTION
+The
+.Nm
+utility installs, updates, or deletes firmware packages for
+.Ar driver
+from the Internet.
+If no
+.Ar driver
+is specified, the
+.Nm
+utility tries to determine which firmware are needed on the system.
+.Pp
+Since firmware with acceptable licenses are already present in
+.Ox ,
+.Nm
+exists purely to deal with firmware that may not be freely
+distributed with
+.Ox .
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl a
+Install or update firmware for all drivers.
+It is an error to specify this option with any
+.Ar driver
+arguments.
+.It Fl d
+Delete firmware for
+.Ar driver .
+If used without parameters, delete unneeded drivers.
+If used in conjunction with
+.Fl a ,
+delete firmware for all drivers.
+.It Fl n
+Dry run.
+Do not actually install or update any firmware packages;
+just report the steps that would be taken.
+.It Fl p Ar path
+Use the firmware found at
+.Ar path ,
+being either a local directory or a URL,
+instead of the default location.
+.It Fl v
+Turn on verbose output.
+This flag can be specified multiple times for increased verbosity.
+.El
+.Pp
+Firmware is downloaded from release-specific directories at
+.Lk http://firmware.openbsd.org/firmware/ .
+The files are in the format required by
+.Xr pkg_add 1 ,
+but direct use of pkg_add is discouraged.
+.Sh SEE ALSO
+.Xr pkg_add 1 ,
+.Xr dmesg 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+program was designed by
+.An Alexander Hall Aq Mt alexander@beard.se ,
+current code was written by
+.An Marc Espie Aq Mt espie@openbsd.org .