def systemd_running_state(name, path=None):
 try:
  ret = run_all(name, 'systemctl is-system-running', path=path, ignore_retcode=True)['stdout']
 except CommandExecutionError:
  ret = ''
 return ret

def systemd_running_state ( name , path = None ) : try : ret = run_all ( name , 'systemctl is-system-running' , path = path , ignore_retcode = True ) [ 'stdout' ] except CommandExecutionError : ret = '' return ret
get the operational state of a systemd based container path path to the container parent default: /var/lib/lxc .