Change netcfg to validate on write and commit on fsync
Created by: batonius
As discussed, the PR changes the behavior of netcfg
so it validates each line on write, and commits the changes on fsync
and close
. This way it's possible to return configuration errors via the return value of File::sync_data
.