From 7ee1cb5208eaa7a0ce86eea5263d0d17e94feae1 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 8 Jul 2019 09:23:48 +0100 Subject: [PATCH] - apachectl: restore -V/-v/-t support (#1727434) --- apachectl.sh | 6 +++++- httpd.spec | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apachectl.sh b/apachectl.sh index 77868fe..e0f6f78 100755 --- a/apachectl.sh +++ b/apachectl.sh @@ -49,10 +49,14 @@ graceful-stop) /usr/bin/systemctl kill --signal=SIGWINCH $SVC ERROR=$? ;; -configtest) +configtest|-t) $HTTPD -t ERROR=$? ;; +-v|-V) + $HTTPD $ACMD + ERROR=$? + ;; *) echo apachectl: The \"$ACMD\" option is not supported. 1>&2 ERROR=2 diff --git a/httpd.spec b/httpd.spec index a94fdb6..5fbcc76 100644 --- a/httpd.spec +++ b/httpd.spec @@ -406,7 +406,8 @@ sed -i \ docs/conf/extra/*.conf # Set correct path for httpd binary in apachectl script -sed -i 's,@HTTPDBIN@,%{_sbindir}/httpd,g' $RPM_SOURCE_DIR/apachectl.sh +sed 's,@HTTPDBIN@,%{_sbindir}/httpd,g' $RPM_SOURCE_DIR/apachectl.sh \ + > apachectl.sh # Create cache directory mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/httpd \ @@ -474,7 +475,8 @@ install -m755 $RPM_SOURCE_DIR/httpd-ssl-gencerts \ $RPM_BUILD_ROOT%{_libexecdir}/httpd-ssl-gencerts # Install scripts -install -p -m 755 $RPM_SOURCE_DIR/apachectl.sh $RPM_BUILD_ROOT%{_sbindir}/apachectl +install -m 755 apachectl.sh $RPM_BUILD_ROOT%{_sbindir}/apachectl +touch -r $RPM_SOURCE_DIR/apachectl.sh $RPM_BUILD_ROOT%{_sbindir}/apachectl mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/initscripts/legacy-actions/httpd for f in graceful configtest; do install -p -m 755 $RPM_SOURCE_DIR/action-${f}.sh \ @@ -743,6 +745,7 @@ exit $rv %changelog * Mon Jul 8 2019 Joe Orton - 2.4.39-10 - htpasswd: add SHA-256/512 support +- apachectl: restore -V/-v/-t support (#1727434) * Fri Jun 21 2019 Joe Orton - 2.4.39-9 - create instance-specific StateDir in httpd@.service, instance.conf