def _check_systemd_salt_config():
    conf = '/etc/sysctl.d/99-salt.conf'
    if not os.path.exists(conf):
        sysctl_dir = os.path.split(conf)[0]
        if not os.path.exists(sysctl_dir):
            os.makedirs(sysctl_dir)
        try:
            salt.utils.fopen(conf, 'w').close()
        except (__HOLE__, OSError):
            msg = 'Could not create file: {0}'
            raise CommandExecutionError(msg.format(conf))
    return conf
dataset/ETHPy150Open saltstack/salt/salt/modules/linux_sysctl.py/_check_systemd_salt_config