diff --git a/python/vyos/configsource.py b/python/vyos/configsource.py index f582bdfab0..59e5ac8a19 100644 --- a/python/vyos/configsource.py +++ b/python/vyos/configsource.py @@ -204,6 +204,8 @@ def in_session(self): Returns: True if called from a configuration session, False otherwise. """ + if os.getenv('VYOS_CONFIGD', ''): + return False try: self._run(self._make_command('inSession', '')) return True diff --git a/src/services/vyos-configd b/src/services/vyos-configd index a4b839a7fd..69ee15bf18 100755 --- a/src/services/vyos-configd +++ b/src/services/vyos-configd @@ -267,6 +267,8 @@ if __name__ == '__main__': cfg_group = grp.getgrnam(CFG_GROUP) os.setgid(cfg_group.gr_gid) + os.environ['VYOS_CONFIGD'] = 't' + def sig_handler(signum, frame): shutdown()