From f8a8c61aad675b62ce85c80edce84ee17f6aaeb4 Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Wed, 18 Jun 2008 19:01:11 +0000 Subject: [PATCH] also set vsys to restart when the vsys.conf file is re-written. this avoids the vsys update, which may wipe out the current /etc/vsys.conf file, from keeping vsys dysfunctional forever. Previously, vsys never would have been restarted. --- vsys.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vsys.py b/vsys.py index fa49b4b..a429760 100644 --- a/vsys.py +++ b/vsys.py @@ -36,7 +36,7 @@ def GetSlivers(data): scripts[attribute['value']].append(sliver['name']) # Write the conf - writeConf(slices, parseConf()) + _restart = writeConf(slices, parseConf()) or _restart # Write out the ACLs if writeAcls(scripts, parseAcls()) or _restart: logger.log("vsys: restarting vsys service") @@ -123,6 +123,9 @@ def writeConf(slivers, oldslivers): f.write("/vservers/%(name)s/vsys %(name)s\n" % {"name": sliver}) f.truncate() f.close() + return True + else: + return False def parseConf(): -- 2.43.0