mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-20 10:57:51 +02:00
mod/ipcalc: $IPCalc: use $ExitError to indicate unintentional error
This commit is contained in:
parent
05cb87f475
commit
34172e4c78
1 changed files with 4 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
|||
:global IPCalcReturn;
|
||||
|
||||
# print netmask, network, min host, max host and broadcast
|
||||
:set IPCalc do={
|
||||
:set IPCalc do={ :do {
|
||||
:local Input [ :tostr $1 ];
|
||||
|
||||
:global FormatLine;
|
||||
|
@ -27,7 +27,9 @@
|
|||
[ $FormatLine "HostMin" ($Values->"hostmin") ] . "\n" . \
|
||||
[ $FormatLine "HostMax" ($Values->"hostmax") ] . "\n" . \
|
||||
[ $FormatLine "Broadcast" ($Values->"broadcast") ]) ];
|
||||
}
|
||||
} on-error={
|
||||
:global ExitError; $ExitError false $0;
|
||||
} }
|
||||
|
||||
# calculate and return netmask, network, min host, max host and broadcast
|
||||
:set IPCalcReturn do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue