]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- use helper script to generate %service
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 1 Dec 2005 01:37:16 +0000 (01:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.267

rpm.macros

index 594a5b36916133f28217cd2c345ca30e599d0c40..de7cc877d5fc8a854c957ca83e386cd8f34f40fa 100644 (file)
@@ -782,20 +782,4 @@ if [ "$1" = "0" ] || [ "$2" = "0" ]; then \
 #
 #  -q be silent when service isn't started (for postun scriplets)
 #
-%service(q) {{ \
-# we use function, not to globber namespace with useless variables \
-skip_auto_restart() { \
-       . /etc/sysconfig/rpm; # global setting \
-       [ -f /etc/sysconfig/%1 ] && . /etc/sysconfig/%1; # per service setting \
-       echo ${RPM_SKIP_AUTO_RESTART:-no}; \
-}; \
-if [ -f /var/lock/subsys/%1 ]; then \
-       if [ $(skip_auto_restart) = no ]; then \
-               /etc/rc.d/init.d/%1 %2 1>&2; \
-%{!-q:else} \
-       %{!-q:echo 'Run "/etc/rc.d/init.d/%1 %2" to %2 %{!?3:%1 service}%{?3:%(set -- %{*}; echo "$3")}.';} \
-       fi \
-%{!-q:else} \
-       %{!-q:echo 'Run "/etc/rc.d/init.d/%1 start" to start %{!?3:%1 service}%{?3:%(set -- %{*}; echo "$3")}.';} \
-fi }; }
-
+%service(q) {{%(export quiet=%{-q:1}; sh /usr/lib/rpm/service_generator.sh %{*}); }}
This page took 0.127912 seconds and 4 git commands to generate.