9f9d7ec sss_cache: Do nothing if SYSTEMD_OFFLINE=1

1 file Authored by Colin Walters 4 years ago, Committed by jhrozek 4 years ago,
    sss_cache: Do nothing if SYSTEMD_OFFLINE=1
    
    Today running `rpm-ostree compose tree` results in a big spam
    of warnings like:
    
    ```
    Running pre scripts... openssh
    openssh.prein: (Fri Feb 15 15:50:41:748148 2019) [sss_cache] [confdb_init] (0x0010): Unable to open config database [/var/lib/sss/db/config.ldb]
    openssh.prein: Could not open available domains
    openssh.prein: groupadd.rpmostreesave: sss_cache exited with status 5
    openssh.prein: groupadd.rpmostreesave: Failed to flush the sssd cache.
    openssh.prein: (Fri Feb 15 15:50:41:774909 2019) [sss_cache] [confdb_init] (0x0010): Unable to open config database [/var/lib/sss/db/config.ldb]
    openssh.prein: Could not open available domains
    openssh.prein: groupadd.rpmostreesave: sss_cache exited with status 5
    ```
    
    This is because rpm-ostree doesn't want scripts writing into `/var`;
    it's system-administrator managed state.
    
    Really, SSSD should probably be silently ignoring system users.
    
    But let's just silently do nothing if we're running offline, as
    there won't be a sssd running.
    
    Reviewed-by: Sumit Bose <sbose@redhat.com>
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    
        
file modified
+15 -0