Commit 999d9e45 authored by Mark Schouten's avatar Mark Schouten
Browse files

Fix saving current configuration to a file

parent 5dd88ae1
......@@ -3,7 +3,7 @@
ypconfig configtest [--cfg=configfile]
ypconfig createconfig
ypconfig createconfig [--cfg=configfile]
-h --help Show this help
......@@ -11,7 +11,7 @@ Options:
import sys, os
sys.path.insert(0, '/home/mark/src/ypconfig/lib')
sys.path.insert(0, os.path.join(os.getcwd(), 'lib'))
from ypconfig import Config, Netlink
from docopt import docopt
......@@ -49,4 +49,5 @@ if __name__ == '__main__':
print("Configuration is ok!")
elif args['createconfig']:
cfg = Netlink.GetNow()
cfg = Config.Validate(cfg)
Config.Set(args['--cfg'], cfg)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment