Module Name: src Committed By: spz Date: Thu Jan 23 07:26:51 UTC 2014
Modified Files: src/distrib/sets/lists/base: mi src/etc/mtree: NetBSD.dist.base src/etc/rc.d: wpa_supplicant src/share/examples: Makefile Added Files: src/share/examples/wpa_supplicant: Makefile wpa_supplicant.conf Log Message: - make etc/rc.d/wpa_supplicant create directory /var/run/wpa_supplicant on startup - create share/examples/wpa_supplicant/wpa_supplicant.conf and make it known in the relevant places. Improvements welcome, my point was ctrl_interface and "you seriously want this" To generate a diff of this commit: cvs rdiff -u -r1.1060 -r1.1061 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.132 -r1.133 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.4 -r1.5 src/etc/rc.d/wpa_supplicant cvs rdiff -u -r1.21 -r1.22 src/share/examples/Makefile cvs rdiff -u -r0 -r1.1 src/share/examples/wpa_supplicant/Makefile \ src/share/examples/wpa_supplicant/wpa_supplicant.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1060 src/distrib/sets/lists/base/mi:1.1061 --- src/distrib/sets/lists/base/mi:1.1060 Thu Jan 16 14:46:36 2014 +++ src/distrib/sets/lists/base/mi Thu Jan 23 07:26:50 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1060 2014/01/16 14:46:36 pgoyette Exp $ +# $NetBSD: mi,v 1.1061 2014/01/23 07:26:50 spz Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -1797,6 +1797,8 @@ ./usr/share/examples/verifiedexec_load base-obsolete obsolete ./usr/share/examples/verifiedexec_load/gen_md5 base-obsolete obsolete ./usr/share/examples/verifiedexec_load/gen_sha1 base-obsolete obsolete +./usr/share/examples/wpa_supplicant base-netutil-examples +./usr/share/examples/wpa_supplicant/wpa_supplicant.conf base-netutil-examples share ./usr/share/examples/wsmoused base-sysutil-examples ./usr/share/examples/wsmoused/wsmoused.conf base-sysutil-examples share ./usr/share/games base-games-share Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.132 src/etc/mtree/NetBSD.dist.base:1.133 --- src/etc/mtree/NetBSD.dist.base:1.132 Sun Jan 5 16:38:06 2014 +++ src/etc/mtree/NetBSD.dist.base Thu Jan 23 07:26:50 2014 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.132 2014/01/05 16:38:06 joerg Exp $ +# $NetBSD: NetBSD.dist.base,v 1.133 2014/01/23 07:26:50 spz Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -402,6 +402,7 @@ ./usr/share/examples/supfiles ./usr/share/examples/syslogd ./usr/share/examples/tmux +./usr/share/examples/wpa_supplicant ./usr/share/examples/wsmoused ./usr/share/games ./usr/share/games/atc Index: src/etc/rc.d/wpa_supplicant diff -u src/etc/rc.d/wpa_supplicant:1.4 src/etc/rc.d/wpa_supplicant:1.5 --- src/etc/rc.d/wpa_supplicant:1.4 Fri Feb 1 13:29:33 2013 +++ src/etc/rc.d/wpa_supplicant Thu Jan 23 07:26:51 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: wpa_supplicant,v 1.4 2013/02/01 13:29:33 tron Exp $ +# $NetBSD: wpa_supplicant,v 1.5 2014/01/23 07:26:51 spz Exp $ # # PROVIDE: wpa_supplicant @@ -22,6 +22,14 @@ rcvar=$name command="/usr/sbin/wpa_supplicant" reload_cmd="/usr/sbin/wpa_cli reconfigure" extra_commands="reload" +start_precmd="wpa_supplicant_precmd" + +wpa_supplicant_precmd() +{ + if [ ! -d /var/run/wpa_supplicant ]; then + mkdir -p -m 755 /var/run/wpa_supplicant + fi +} load_rc_config $name run_rc_command "$1" Index: src/share/examples/Makefile diff -u src/share/examples/Makefile:1.21 src/share/examples/Makefile:1.22 --- src/share/examples/Makefile:1.21 Wed Aug 22 06:45:16 2012 +++ src/share/examples/Makefile Thu Jan 23 07:26:51 2014 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.21 2012/08/22 06:45:16 spz Exp $ +# $NetBSD: Makefile,v 1.22 2014/01/23 07:26:51 spz Exp $ SUBDIR= amd apm asm disktab emul fstab ftpd getdate hostapd \ - isdn lua npf pppd racoon supfiles syslogd wsmoused + isdn lua npf pppd racoon supfiles syslogd wpa_supplicant wsmoused .include <bsd.subdir.mk> Added files: Index: src/share/examples/wpa_supplicant/Makefile diff -u /dev/null src/share/examples/wpa_supplicant/Makefile:1.1 --- /dev/null Thu Jan 23 07:26:51 2014 +++ src/share/examples/wpa_supplicant/Makefile Thu Jan 23 07:26:51 2014 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2014/01/23 07:26:51 spz Exp $ + +NOOBJ= # defined + +.include <bsd.own.mk> + +.if ${MKSHARE} != "no" +FILES= wpa_supplicant.conf +FILESDIR= /usr/share/examples/wpa_supplicant +.endif + +.include <bsd.prog.mk> Index: src/share/examples/wpa_supplicant/wpa_supplicant.conf diff -u /dev/null src/share/examples/wpa_supplicant/wpa_supplicant.conf:1.1 --- /dev/null Thu Jan 23 07:26:51 2014 +++ src/share/examples/wpa_supplicant/wpa_supplicant.conf Thu Jan 23 07:26:51 2014 @@ -0,0 +1,107 @@ +# example wpa_supplicant config +# +# please refer to the wpa_supplicant.conf man page + +# wpa_cli and dhcpcd won't work well if you have no ctrl_interface set +# the value must be a directory, the sockets will be named after the interfaces +ctrl_interface=/var/run/wpa_supplicant/ + +# if non-root should be allowed to send wpa_supplicant commands via wpa_cli +# name a group whose members will be Allowed(tm) +ctrl_interface_group=wheel + +# WEP .. all the stopping power of a "please keep off the lawn" sign +# least common denominator "security" so it's formally not open +network={ + ssid="TheLawn" + key_mgmt=NONE + wep_tx_keyidx=0 + #wep_key0="pleasekeepoff" + wep_key0=706c656173656b6565706f6666 + priority=2 +} + +# simple WPA-PSK, a favourite with conferences and hotel networks +network={ + ssid="SomeConference" + key_mgmt=WPA-PSK + psk="secretKey" +} + +# using eduroam for more examples: + +## eduroam with PEAP/MSCHAPv2 +#network={ +# ssid="eduroam" +# scan_ssid=1 +# +# # The 'identity' is the username used for authentication. +# identity="user1234@your.university.domain" +# +# # add yours +# password="myPassword" +# +# # download a fitting CA cert and put the path to it here +# ca_cert="/etc/openssl/certs/eduroam-CA-cert.pem" +# +# # where the authentication requests should be routed to +# anonymous_identity="anonymous@your.university.domain" +# +# key_mgmt=WPA-EAP +# auth_alg=OPEN +# eap=PEAP +# phase2="auth=MSCHAPv2" +# +# priority=5 +#} +# +## eduroam with EAP-TLS +#network={ +# ssid="eduroam" +# scan_ssid=1 +# +# # The 'identity' is the username used for authentication. +# identity="user1234@your.university.domain" +# +# client_cert="/home/you/eduroam/user.cert" +# private_key="/home/you/eduroam/user.key" +# private_key_passwd="s3kr3t" +# +# # download a fitting CA cert and put the path to it here +# ca_cert="/etc/openssl/certs/eduroam-CA-cert.pem" +# +# # where the authentication requests should be routed to +# anonymous_identity="anonymous@your.university.domain" +# +# key_mgmt=WPA-EAP +# auth_alg=OPEN +# eap=TLS +# +# priority=4 +#} +# +## eduroam with TTLS+PAP +#network={ +# ssid="eduroam" +# scan_ssid=1 +# +# # The 'identity' is the username used for authentication. +# identity="user1234@your.university.domain" +# +# # add yours +# password="myPassword" +# +# # download a fitting CA cert and put the path to it here +# ca_cert="/etc/openssl/certs/eduroam-CA-cert.pem" +# +# # where the authentication requests should be routed to +# anonymous_identity="anonymous@your.university.domain" +# +# key_mgmt=WPA-EAP +# auth_alg=OPEN +# eap=TTLS +# phase2="auth=PAP" +# +# priority=3 +#} +#