1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00
Roopa Prabhu cfa06db648 ifupdown2: syntax-check: exit with 1 if syntax errors
Ticket: CM-7995
Reviewed By: CCR-3850
Testing Done: Tested exit code on syntax errors

This patch adds members 'errors' and 'warns' to networkinterfaces.py
to track errors and warns during parsing interfaces file.

This patch also adds --syntax-check option to ifreload
given people seem to use ifreload more than ifup these days.

$ ifreload --syntax-check -a
error: /etc/network/interfaces: iface swp1.200: unsupported keyword (roopa-attr)
$ echo $?
1

(cherry picked from commit e643a136fcf5d387ff0f9a31cb6a6af4983e1012)
2015-12-09 13:53:55 -05:00
..