summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2014-12-03 19:55:50 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2014-12-03 19:55:50 +0000
commitb486b55beebd49db2961d7f5c5cc2a9738b8090b (patch)
tree61caeaa29f241d96fae06c02945dc62ab9528aeb
parentf31c5b32f47c02d507724c8d95d9ba7e432d124f (diff)
The kernel handles rtsol(8) functionality since some time now.
Treat rtsol in hostname.if as a keyword like dhcp and call ifconfig inet6 autoconf. "reads good" todd@ OK krw@ (who is *not* an IPv6 person), but I recruited him in his capacity as an installer person.
-rw-r--r--distrib/miniroot/install.sub18
-rw-r--r--etc/netstart4
2 files changed, 13 insertions, 9 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 43d2b9d55b0..bb9550030cf 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.799 2014/11/18 19:00:16 rpe Exp $
+# $OpenBSD: install.sub,v 1.800 2014/12/03 19:55:49 florian Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
# All rights reserved.
@@ -936,16 +936,16 @@ v6_config() {
set -- $(v6_info $_ifs)
[[ -n $2 ]] && { _addr=$2; _prefixlen=$3; }
- [[ -x /sbin/rtsol ]] && _prompt="or 'rtsol' "
+ ifconfig $_ifs inet6 >/dev/null 2>&1 && _prompt="or 'rtsol' "
_prompt="IPv6 address for $_ifs? (${_prompt}or 'none')"
ask_until "$_prompt" "${_addr:-none}"
case $resp in
none) return
;;
- rtsol) [[ ! -x /sbin/rtsol ]] && { echo "No /sbin/rtsol."; return; }
+ rtsol) ifconfig $_ifs inet6 >/dev/null 2>&1 || { echo "No INET6 support."; return; }
ifconfig $_ifs up
- rtsol -F $_ifs && echo "up\nrtsol" >>$_hn
+ ifconfig $_ifs inet6 autoconf && echo "up\nrtsol" >>$_hn
return
;;
esac
@@ -1049,8 +1049,12 @@ ifstart () {
fi
;;
"rtsol")
- rtsolif="$rtsolif $if"
- cmd="ifconfig $if $name $mask $bcaddr $ext1 $ext2 up"
+ if ifconfig $if inet6 >/dev/null 2>&1; then
+ rtsolif="$rtsolif $if"
+ cmd="ifconfig $if $name $mask $bcaddr $ext1 $ext2 up"
+ else
+ cmd="$cmd; echo no INET6 support - skipping rtsol request."
+ fi
;;
*) read dt dtaddr
if [ "$name" = "alias" ]; then
@@ -1148,7 +1152,7 @@ enable_network() {
ifstart $hn
done
- [[ -n $rtsolif ]] && /mnt/sbin/rtsol -F $rtsolif
+ [[ -n $rtsolif ]] && ifconfig $rtsolif inet6 autoconf
# /mnt/etc/mygate, if it exists, contains the address(es) of my
# default gateway(s). Use for ipv4 if no interfaces configured via
diff --git a/etc/netstart b/etc/netstart
index 6fa4d933034..9ef974096ef 100644
--- a/etc/netstart
+++ b/etc/netstart
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: netstart,v 1.143 2014/09/28 12:58:02 claudio Exp $
+# $OpenBSD: netstart,v 1.144 2014/12/03 19:55:49 florian Exp $
# Strip comments (and leading/trailing whitespace if IFS is set)
# from a file and spew to stdout
@@ -245,7 +245,7 @@ if [ "$ip6kernel" = "YES" -a "x$rtsolif" != "x" ]; then
fw=`sysctl -n net.inet6.ip6.forwarding`
if [ "x$fw" = "x0" ]; then
echo "IPv6 autoconf:$rtsolif"
- rtsol $rtsolif
+ ifconfig $rtsolif inet6 autoconf
else
echo "IPv6 autoconf not supported while IPv6 forwarding is enabled"
fi