Skip to content

Commit

Permalink
SSSCTL: Replace sss_debuglevel with shell wrapper
Browse files Browse the repository at this point in the history
The sss_debuglevel binary is replaced by a shell wrapper calling
sssctl debug-level as part of merging sss_debuglevel into sssctl.
The wrapper will redirect sss_debuglevel to the sssctl debug-level
command performing the same task. The sss_debuglevel(8) man page is
updated to indicate that sss_debuglevel is deprecated and functionality
exists now in sssctl.

Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Michal Židek <mzidek@redhat.com>
  • Loading branch information
justin-stephenson authored and Lukas Slebodnik committed Sep 25, 2017
1 parent d2c6141 commit da19eae
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 33 deletions.
13 changes: 13 additions & 0 deletions Makefile.am
Expand Up @@ -432,6 +432,10 @@ py3exec_LTLIBRARIES = \
$(NULL)
endif

sbin_SCRIPTS = \
src/tools/wrappers/sss_debuglevel \
$(NULL)

dist_noinst_SCRIPTS = \
$(EXTRA_SCRIPTS) \
src/config/setup.py \
Expand Down Expand Up @@ -4668,6 +4672,14 @@ src/sysv/systemd/sssd-kcm.service: src/sysv/systemd/sssd-kcm.service.in Makefile
$(replace_script)
endif

EXTRA_DIST += \
src/tools/wrappers/sss_debuglevel.in \
$(NULL)

src/tools/wrappers/sss_debuglevel: src/tools/wrappers/sss_debuglevel.in Makefile
@$(MKDIR_P) src/tools/wrappers/
$(replace_script)

SSSD_USER_DIRS = \
$(DESTDIR)$(dbpath) \
$(DESTDIR)$(keytabdir) \
Expand Down Expand Up @@ -4912,6 +4924,7 @@ endif
rm -f $(builddir)/src/sysv/systemd/sssd-kcm.socket
rm -f $(builddir)/src/sysv/systemd/sssd-kcm.service
rm -f $(builddir)/src/sysv/systemd/journal.conf
rm -f $(builddir)/src/tools/wrappers/sss_debuglevel

CLEANFILES += *.X */*.X */*/*.X

Expand Down
2 changes: 1 addition & 1 deletion contrib/sssd.spec.in
Expand Up @@ -1127,7 +1127,7 @@ done
%{_sbindir}/sss_groupshow
%{_sbindir}/sss_obfuscate
%{_sbindir}/sss_override
#%{_sbindir}/sss_debuglevel
%{_sbindir}/sss_debuglevel
%{_sbindir}/sss_seed
%{_sbindir}/sssctl
%{_mandir}/man8/sss_groupadd.8*
Expand Down
36 changes: 4 additions & 32 deletions src/man/sss_debuglevel.8.xml
Expand Up @@ -13,7 +13,7 @@

<refnamediv id='name'>
<refname>sss_debuglevel</refname>
<refpurpose>change debug level while SSSD is running</refpurpose>
<refpurpose>[DEPRECATED] change debug level while SSSD is running</refpurpose>
</refnamediv>

<refsynopsisdiv id='synopsis'>
Expand All @@ -29,40 +29,12 @@
<refsect1 id='description'>
<title>DESCRIPTION</title>
<para>
<command>sss_debuglevel</command> changes debug level of SSSD monitor
and providers to <replaceable>NEW_DEBUG_LEVEL</replaceable> while SSSD is running.
<command>sss_debuglevel</command> is deprecated and replaced
by the sssctl debug-level command. Please refer to the
<command>sssctl</command> man page for more information on sssctl usage.
</para>
</refsect1>

<refsect1 id='options'>
<title>OPTIONS</title>
<variablelist remap='IP'>
<varlistentry>
<term>
<option>-c</option>,<option>--config</option>
</term>
<listitem>
<para>
Specify a non-default config file. The default is
<filename>/etc/sssd/sssd.conf</filename>. For reference
on the config file syntax and options, consult the
<citerefentry>
<refentrytitle>sssd.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>
manual page.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>NEW_DEBUG_LEVEL</replaceable>
</term>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/debug_levels.xml" />
</varlistentry>
</variablelist>
</refsect1>

<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/seealso.xml" />

</refentry>
Expand Down
4 changes: 4 additions & 0 deletions src/tools/wrappers/sss_debuglevel.in
@@ -0,0 +1,4 @@
#!/bin/sh
sbindir=@sbindir@
echo "Redirecting to $sbindir/sssctl debug-level"
$sbindir/sssctl debug-level $@

0 comments on commit da19eae

Please sign in to comment.