]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - service_generator.sh
- tmpdir moved to main macros; sane buildroot by default
[packages/rpm-build-macros.git] / service_generator.sh
index b0303ac90669d2200c48baaed451b6da9a3503c6..83e765395f04304aba4c0bc17145b1aea8c10fd6 100644 (file)
@@ -9,7 +9,7 @@ if [ -z "$desc" ]; then
 fi
 
 # action stop implies quiet mode and check disabling
-if [ $action = stop ]; then
+if [ "$action" = "stop" ]; then
        quiet=1
 else
        check=1
@@ -19,12 +19,12 @@ fi
 service_body() {
        cat <<-EOF
        if [ -f /var/lock/subsys/$service ]; then
-               /etc/rc.d/init.d/$service $action 1>&2
+               /sbin/service $service $action 1>&2 || :;
 EOF
        if [ "$quiet" != 1 ]; then
                cat <<-EOF
                else
-                       echo 'Run "/etc/rc.d/init.d/$service start" to start $desc.'
+                       echo 'Run "/sbin/service $service start" to start $desc.'
 EOF
        fi
        cat <<-EOF
@@ -35,7 +35,6 @@ EOF
 # include check function
 skip_auto_restart_body() {
        cat <<-EOF
-
        skip_auto_restart() {
                [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
                [ -f /etc/sysconfig/$service ] && . /etc/sysconfig/$service
This page took 0.04229 seconds and 4 git commands to generate.