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
|
fi
|
||||||
|
|
||||||
if [[ ! -z "$MTU" ]]; then
|
if [[ ! -z "$MTU" ]]; then
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}"
|
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
|
else
|
||||||
MTU=""
|
MTU=""
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}"
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}"
|
||||||
|
Loading…
Reference in New Issue
Block a user