mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-07 08:19:17 +00:00
Add input sanity checking
This commit is contained in:
parent
dffa262b88
commit
75c5eeba44
@ -862,7 +862,12 @@ config_file(){
|
||||
fi
|
||||
|
||||
if [[ ! -z "$MTU" ]]; then
|
||||
if [[ "$MTU" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}"
|
||||
else
|
||||
msg_error "MTU must be an integer"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
MTU=""
|
||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}"
|
||||
|
Loading…
Reference in New Issue
Block a user