File sysconfig-ifup-dhcp-skip-dhcpv6-without-ipv6.bnc445686.diff of Package sysconfig
Index: scripts/ifup-dhcp
===================================================================
--- scripts/ifup-dhcp (Revision 1811)
+++ scripts/ifup-dhcp (Revision 1817)
@@ -185,6 +185,9 @@
stop)
;;
*)
+ HAVE_IPv6=yes
+ test -d /proc/sys/net/ipv6 || HAVE_IPv6=no
+
clients=0
bootprotos=(${BOOTPROTOS[@]})
BOOTPROTOS=()
@@ -220,6 +223,8 @@
esac
;;
(dhcp6)
+ [ "x$HAVE_IPv6" = xyes ] || DHCLIENT6=""
+
case "$DHCLIENT6" in
(dhcp6c)
if [ -x "$DHCLIENT6_BIN" ] ; then
@@ -236,8 +241,12 @@
;;
"")
if [ "x$explicit_dhcp6" = "xyes" ] ; then
- print_mesg err_mesg "DHCP6 client is not available."
- print_mesg err_mesg " Please install 'dhcpv6' package'"
+ if [ "x$HAVE_IPv6" = xyes ] ; then
+ print_mesg err_mesg "DHCP6 client is not available."
+ print_mesg err_mesg " Please install 'dhcpv6' package'"
+ else
+ print_mesg err_mesg "DHCP6 disabled - no IPv6 support"
+ fi
fi
;;
*)
@@ -252,6 +261,7 @@
# exit when not even one of the requested clients is installed
# or the a client was explicitely requested in bootproto
+ [ "x$HAVE_IPv6" = xyes ] && \
[ "x$explicit_dhcp6" = "xyes" -a "x$DHCLIENT6" = x ] && exit $R_ERROR
[ "x$explicit_dhcp4" = "xyes" -a "x$DHCLIENT" = x ] && exit $R_ERROR
[ $clients -eq 0 ] && exit $R_ERROR