Don't prevent the user from hanging their system by changing network
settings while NFS mounts are active; but DO warn them and make the default action to do nothing. (thanks julian)
This commit is contained in:
parent
e587249b7f
commit
39c229261f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=252853
@ -73,7 +73,7 @@ msg_network_configuration="%s Network Configuration:\nChoose Save/Exit when fini
|
||||
msg_network_interfaces="Network Interfaces"
|
||||
msg_network_management="Network Management"
|
||||
msg_networking_devices="Networking Devices"
|
||||
msg_nfs_mounts_may_cause_hang="WARNING! Changing this setting while NFS directories are\nmounted may cause the system to hang. Please exit this\nutility and dismount any/all remaining NFS-mounts before\nattempting to change this setting.\n\n%s"
|
||||
msg_nfs_mounts_may_cause_hang="WARNING! Changing this setting while NFS directories are\nmounted may cause the system to hang. Are you sure you\nwant to proceed?\n\n%s"
|
||||
msg_no_network_interfaces="No network interfaces detected."
|
||||
msg_no_options="No options (Default)"
|
||||
msg_ok="OK"
|
||||
|
@ -263,15 +263,14 @@ f_dialog_menu_netdev_edit()
|
||||
case "$tag" in
|
||||
X\ *) break ;;
|
||||
2\ *) #
|
||||
# Do not proceed if/when there are NFS-mounts currently
|
||||
# active. If the network is changed while NFS-exported
|
||||
# directories are mounted, the system may hang (if any
|
||||
# NFS mounts are using that interface).
|
||||
# Proceed cautiously (confirm with the user) if/when NFS-
|
||||
# mounts are active. If the network on which these mounts
|
||||
# are made is changed parts of the system may hang.
|
||||
#
|
||||
if f_nfs_mounted && ! f_jailed; then
|
||||
local setting="$( printf "$msg_current_dhcp_status" \
|
||||
"$interface" "$dhcp_status" )"
|
||||
f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
|
||||
f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" ||
|
||||
continue
|
||||
fi
|
||||
|
||||
|
@ -146,7 +146,7 @@ f_dialog_input_ipaddr()
|
||||
if f_nfs_mounted && ! f_jailed; then
|
||||
local setting="$( printf "$msg_current_ipaddr" \
|
||||
"$interface" "$_ipaddr" )"
|
||||
f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
|
||||
f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" ||
|
||||
return $FAILURE
|
||||
fi
|
||||
|
||||
|
@ -117,7 +117,7 @@ f_dialog_input_options()
|
||||
if f_nfs_mounted && ! f_jailed; then
|
||||
local setting="$( printf "$msg_current_options" \
|
||||
"$interface" "$options" )"
|
||||
f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
|
||||
f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" ||
|
||||
return $FAILURE
|
||||
fi
|
||||
|
||||
@ -164,7 +164,7 @@ f_dialog_menu_media_options()
|
||||
if f_nfs_mounted && ! f_jailed; then
|
||||
local setting="$( printf "$msg_current_options" \
|
||||
"$interface" "$_options" )"
|
||||
f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
|
||||
f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" ||
|
||||
return $FAILURE
|
||||
fi
|
||||
|
||||
|
@ -96,7 +96,7 @@ f_dialog_input_netmask()
|
||||
if f_nfs_mounted && ! f_jailed; then
|
||||
local setting="$( printf "$msg_current_subnet" \
|
||||
"$interface" "$_netmask" )"
|
||||
f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
|
||||
f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" ||
|
||||
return $FAILURE
|
||||
fi
|
||||
|
||||
|
@ -74,7 +74,7 @@ f_dialog_input_defaultrouter()
|
||||
if f_nfs_mounted && ! f_jailed; then
|
||||
local setting="$( printf "$msg_current_default_router" \
|
||||
"$defaultrouter" )"
|
||||
f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
|
||||
f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" ||
|
||||
return $FAILURE
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user