device.subr (721819bedb3b144b7f64a4b798d22e6af4d5fd9e) device.subr (4128cd31c15b8b5256ae6bb5b8b4f84bd3f098d3)
1if [ ! "$_NETWORKING_DEVICE_SUBR" ]; then _NETWORKING_DEVICE_SUBR=1
2#
3# Copyright (c) 2006-2013 Devin Teske
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 264 unchanged lines hidden (view full) ---

273 dhcp=
274 else
275 trap - SIGINT
276 ( # Execute within sub-shell to allow/catch Ctrl-C
277 trap 'exit $FAILURE' SIGINT
278 msg=$( printf "$msg_scanning_for_dhcp" "$interface" )
279 if [ "$USE_XDIALOG" ]; then
280 (
1if [ ! "$_NETWORKING_DEVICE_SUBR" ]; then _NETWORKING_DEVICE_SUBR=1
2#
3# Copyright (c) 2006-2013 Devin Teske
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 264 unchanged lines hidden (view full) ---

273 dhcp=
274 else
275 trap - SIGINT
276 ( # Execute within sub-shell to allow/catch Ctrl-C
277 trap 'exit $FAILURE' SIGINT
278 msg=$( printf "$msg_scanning_for_dhcp" "$interface" )
279 if [ "$USE_XDIALOG" ]; then
280 (
281 f_quietly ifconfig $interface delete
282 f_quietly dhclient $interface
281 f_quietly ifconfig "$interface" delete
282 f_quietly dhclient "$interface"
283 ) |
284 f_xdialog_info "$msg"
285 else
286 f_dialog_info "$msg"
283 ) |
284 f_xdialog_info "$msg"
285 else
286 f_dialog_info "$msg"
287 f_quietly ifconfig $interface delete
288 f_quietly dhclient $interface
287 f_quietly ifconfig "$interface" delete
288 f_quietly dhclient "$interface"
289 fi
290 )
291 retval=$?
292 trap 'interrupt' SIGINT
293 if [ $retval -eq $DIALOG_OK ]; then
294 dhcp=1
289 fi
290 )
291 retval=$?
292 trap 'interrupt' SIGINT
293 if [ $retval -eq $DIALOG_OK ]; then
294 dhcp=1
295 ipaddr=$( f_ifconfig_inet $interface )
296 netmask=$( f_ifconfig_netmask $interface )
295 f_ifconfig_inet "$interface" ipaddr
296 f_ifconfig_inet6 "$interface" ipaddr6
297 f_ifconfig_netmask "$interface" netmask
297 options=
298
299 # Fixup search/domain in resolv.conf(5)
300 hostname=$( f_sysrc_get \
301 'hostname:-$(hostname)' )
302 f_dialog_resolv_conf_update "$hostname"
303 fi
304 fi

--- 81 unchanged lines hidden ---
298 options=
299
300 # Fixup search/domain in resolv.conf(5)
301 hostname=$( f_sysrc_get \
302 'hostname:-$(hostname)' )
303 f_dialog_resolv_conf_update "$hostname"
304 fi
305 fi

--- 81 unchanged lines hidden ---