Browse Source

AMBARI-7310. Error message on ambari-server removal.(vbrodetskyi)

Vitaly Brodetskyi 11 years ago
parent
commit
e3dba26347

+ 1 - 1
ambari-agent/src/main/package/rpm/preremove.sh

@@ -29,7 +29,7 @@ if [ "$1" -eq 0 ]; then  # Action is uninstall
       /var/lib/ambari-agent/install-helper.sh remove
     fi
 
-    chkconfig --del ambari-agent
+    chkconfig --list | grep ambari-server && chkconfig --del ambari-server
 fi
 
 exit 0

+ 1 - 1
ambari-server/src/main/package/rpm/preremove.sh

@@ -34,7 +34,7 @@ if [ "$1" -eq 0 ]; then  # Action is uninstall
       /var/lib/ambari-server/install-helper.sh remove
     fi
 
-    chkconfig --del ambari-server
+    chkconfig --list | grep ambari-server && chkconfig --del ambari-server
 fi
 
 exit 0