Skip to content

Commit

Permalink
Fix network reset script in static IPv6
Browse files Browse the repository at this point in the history
Only exits script when an error occurs when
getting the static IPv6 config info

Signed-off-by: Benjamin Reis <[email protected]>
  • Loading branch information
benjamreis committed Sep 18, 2024
1 parent 9156a03 commit 55b031b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/xe-reset-networking
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ if __name__ == "__main__":

if options.mode_v6 == 'static':
if options.ipv6 == '':
parser.error("if static IPv6 mode is selected, an IPv6 address needs to be specified")
elif options.ipv6.find('/') == -1:
parser.error("if static IPv6 mode is selected, an IPv6 address needs to be specified")
sys.exit(1)
if options.ipv6.find('/') == -1:
parser.error("Invalid format: IPv6 must be specified with CIDR format: <IPv6>/<prefix>")
sys.exit(1)
sys.exit(1)

# Warn user
if not os.access('/tmp/fist_network_reset_no_warning', os.F_OK):
Expand Down

0 comments on commit 55b031b

Please sign in to comment.