diff options
author | gjb <gjb@FreeBSD.org> | 2016-01-04 19:19:48 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2016-01-04 19:19:48 +0000 |
commit | ccde53b74b7bd32198439bfa247743fbf4c91a76 (patch) | |
tree | 3882b41d5bbb0e4ad065fa3392bf2eab80a3d4e3 /usr.sbin/bsdinstall | |
parent | 04942f20347330d49715904f537ca62d33372684 (diff) | |
parent | c9ef17cbe9e3b753415472a271916c098cab7780 (diff) | |
download | FreeBSD-src-ccde53b74b7bd32198439bfa247743fbf4c91a76.zip FreeBSD-src-ccde53b74b7bd32198439bfa247743fbf4c91a76.tar.gz |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.sbin/bsdinstall')
-rw-r--r-- | usr.sbin/bsdinstall/distextract/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/bsdinstall/distfetch/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/bsdinstall/distfetch/distfetch.c | 2 | ||||
-rw-r--r-- | usr.sbin/bsdinstall/partedit/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/bsdinstall/scripts/Makefile | 2 | ||||
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/entropy | 7 | ||||
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/netconfig | 21 |
7 files changed, 24 insertions, 14 deletions
diff --git a/usr.sbin/bsdinstall/distextract/Makefile b/usr.sbin/bsdinstall/distextract/Makefile index 313ec00..d3008f6 100644 --- a/usr.sbin/bsdinstall/distextract/Makefile +++ b/usr.sbin/bsdinstall/distextract/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distextract LIBADD= archive dpv figpar ncursesw dialog m diff --git a/usr.sbin/bsdinstall/distfetch/Makefile b/usr.sbin/bsdinstall/distfetch/Makefile index 5c0f6e8..1620c9b 100644 --- a/usr.sbin/bsdinstall/distfetch/Makefile +++ b/usr.sbin/bsdinstall/distfetch/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distfetch LIBADD= fetch ncursesw dialog m diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c index 4e870c8..219847d 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -78,7 +78,7 @@ main(void) if (chdir(getenv("BSDINSTALL_DISTDIR")) != 0) { snprintf(error, sizeof(error), - "Could could change to directory %s: %s\n", + "Could not change to directory %s: %s\n", getenv("BSDINSTALL_DISTDIR"), strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/partedit/Makefile index d48f777..21d842e 100644 --- a/usr.sbin/bsdinstall/partedit/Makefile +++ b/usr.sbin/bsdinstall/partedit/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall PROG= partedit LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ ${BINDIR}/partedit ${BINDIR}/scriptedpart diff --git a/usr.sbin/bsdinstall/scripts/Makefile b/usr.sbin/bsdinstall/scripts/Makefile index efe9700..c0d6ac2 100644 --- a/usr.sbin/bsdinstall/scripts/Makefile +++ b/usr.sbin/bsdinstall/scripts/Makefile @@ -3,7 +3,7 @@ SCRIPTS= auto adduser checksum config docsinstall entropy hostname jail \ keymap mirrorselect mount netconfig netconfig_ipv4 netconfig_ipv6 \ rootpass script services time umount wlanconfig zfsboot -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall MAN= diff --git a/usr.sbin/bsdinstall/scripts/entropy b/usr.sbin/bsdinstall/scripts/entropy index add6f30..d3938f1 100755 --- a/usr.sbin/bsdinstall/scripts/entropy +++ b/usr.sbin/bsdinstall/scripts/entropy @@ -26,4 +26,9 @@ # # $FreeBSD$ -dd if=/dev/random of=$BSDINSTALL_CHROOT/entropy bs=4096 count=1 +umask 077 +for i in /entropy /boot/entropy; do + i="$BSDINSTALL_CHROOT/$i" + dd if=/dev/random of="$i" bs=4096 count=1 + chown 0:0 "$i" +done diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig index d5a14ce..f9913c3 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig +++ b/usr.sbin/bsdinstall/scripts/netconfig @@ -41,19 +41,24 @@ DIALOG_TAGS="" : ${DIALOG_ITEM_HELP=4} : ${DIALOG_ESC=255} -# Do a dirty check to see if this a wireless interface -- there should be a -# better way -is_wireless_if() { - ifconfig $1 | grep -q 'media: IEEE 802.11 Wireless' -} - for IF in `ifconfig -l`; do test "$IF" = "lo0" && continue (ifconfig -g wlan | egrep -wq $IF) && continue INTERFACES="$INTERFACES $IF" +done + +INTERFACES="$INTERFACES $(sysctl -in net.wlan.devices)" +is_wireless_if() { + for IF in $(sysctl -in net.wlan.devices); do + if [ $IF = $1 ]; then + return 0 + fi + done + return 1 +} + +for IF in $INTERFACES; do DESC=`sysctl -n dev.$(echo $IF | sed -E 's/([[:alpha:]]*)([[:digit:]]*)/\1.\2/g').%desc` - is_wireless_if $IF && echo $DESC | - grep -iqv wireless && DESC="Wireless $DESC" DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\"" done |