[ofa-general] [PATCH] opensm/opensm.spec: comment out service auto-startup setup

Al Chu chu11 at llnl.gov
Thu Sep 11 14:27:59 PDT 2008


Hey Sasha,

Although the %post script below may not be 100% portable, I think it's
pretty typical for system daemon rpms.  A quick "rpm -q --scripts
<daemon-rpm>" shows its pretty common for system daemons on RHEL.  It
should be tweaked for portability rather than being removed.

Personally, I've never done "/sbin/service FOO condrestart" in rpm
scripts.  I do "%{initrddir}/FOO condrestart".  Maybe that's more
portable??

Al

On Thu, 2008-09-11 at 23:11 +0300, Sasha Khapyorsky wrote:
> This addresses bug#1181.
> 
> Comment out opensm service auto-startup setup at %post section.
> 
> Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
> ---
> 
> I don't really know why it was done this way originally. So please send
> any comments and/or objections.
> 
>  opensm/opensm.spec.in |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/opensm/opensm.spec.in b/opensm/opensm.spec.in
> index 2e3abfc..fc7677d 100644
> --- a/opensm/opensm.spec.in
> +++ b/opensm/opensm.spec.in
> @@ -104,11 +104,11 @@ install -m 755 scripts/sldd.sh $RPM_BUILD_ROOT%{_sbindir}/sldd.sh
>  rm -rf $RPM_BUILD_ROOT
>  
>  %post
> -if [ $1 = 1 ]; then
> -    /sbin/chkconfig --add opensmd
> -else
> -    /sbin/service opensmd condrestart
> -fi
> +#if [ $1 = 1 ]; then
> +#    /sbin/chkconfig --add opensmd
> +#else
> +#    /sbin/service opensmd condrestart
> +#fi
>  
>  %preun
>  if [ $1 = 0 ]; then
-- 
Albert Chu
chu11 at llnl.gov
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory




More information about the general mailing list