From da19eaea902744ec3cb41f87fa93fadb767f90e7 Mon Sep 17 00:00:00 2001 From: Justin Stephenson Date: Fri, 12 May 2017 22:42:40 -0400 Subject: SSSCTL: Replace sss_debuglevel with shell wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jakub Hrozek Reviewed-by: Michal Židek --- Makefile.am | 13 +++++++++++++ contrib/sssd.spec.in | 2 +- src/man/sss_debuglevel.8.xml | 36 ++++-------------------------------- src/tools/wrappers/sss_debuglevel.in | 4 ++++ 4 files changed, 22 insertions(+), 33 deletions(-) create mode 100644 src/tools/wrappers/sss_debuglevel.in diff --git a/Makefile.am b/Makefile.am index 352401ce5..cb2075b93 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ @@ -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) \ @@ -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 diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 48ee3d7b9..e76b51833 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -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* diff --git a/src/man/sss_debuglevel.8.xml b/src/man/sss_debuglevel.8.xml index eb11540d8..0538dc502 100644 --- a/src/man/sss_debuglevel.8.xml +++ b/src/man/sss_debuglevel.8.xml @@ -13,7 +13,7 @@ sss_debuglevel - change debug level while SSSD is running + [DEPRECATED] change debug level while SSSD is running @@ -29,40 +29,12 @@ DESCRIPTION - sss_debuglevel changes debug level of SSSD monitor - and providers to NEW_DEBUG_LEVEL while SSSD is running. + sss_debuglevel is deprecated and replaced + by the sssctl debug-level command. Please refer to the + sssctl man page for more information on sssctl usage. - - OPTIONS - - - - , - - - - Specify a non-default config file. The default is - /etc/sssd/sssd.conf. For reference - on the config file syntax and options, consult the - - sssd.conf - 5 - - manual page. - - - - - - NEW_DEBUG_LEVEL - - - - - - diff --git a/src/tools/wrappers/sss_debuglevel.in b/src/tools/wrappers/sss_debuglevel.in new file mode 100644 index 000000000..8df4918d6 --- /dev/null +++ b/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 $@ -- cgit