diff --git a/eucalyptus.spec b/eucalyptus.spec index ac829a586b2..9de3d6a4944 100644 --- a/eucalyptus.spec +++ b/eucalyptus.spec @@ -157,7 +157,7 @@ make 2> err.log > out.log %install make install -ls /usr/share/eucalyptus/*jar|grep -v eucalyptus-walrus|grep -v eucalyptus-storagecontroller|grep -v eucalyptus-cloud > jar_list +ls /usr/share/eucalyptus/*jar > jar_list %clean make uninstall @@ -199,13 +199,10 @@ rm -rf /usr/share/doc/eucalyptus-%{version} /usr/sbin/eucalyptus-cloud %files cloud -/usr/share/eucalyptus/eucalyptus-cloud-*.jar %files walrus -/usr/share/eucalyptus/eucalyptus-walrus-*.jar %files sc -/usr/share/eucalyptus/eucalyptus-storagecontroller-*.jar %files cc /opt/euca-axis2c/services/EucalyptusCC @@ -356,7 +353,7 @@ then [ -x /usr/sbin/euca_conf ] && /usr/sbin/euca_conf --disable cloud if [ -e /etc/init.d/eucalyptus-cloud ]; then - /etc/init.d/eucalyptus-cloud restart + /etc/init.d/eucalyptus-cloud restart || true fi fi @@ -367,7 +364,7 @@ then [ -x /usr/sbin/euca_conf ] && /usr/sbin/euca_conf --disable walrus if [ -e /etc/init.d/eucalyptus-cloud ]; then - /etc/init.d/eucalyptus-cloud restart + /etc/init.d/eucalyptus-cloud restart || true fi fi @@ -377,7 +374,7 @@ then [ -x /usr/sbin/euca_conf ] && /usr/sbin/euca_conf --disable sc if [ -e /etc/init.d/eucalyptus-cloud ]; then - /etc/init.d/eucalyptus-cloud restart + /etc/init.d/eucalyptus-cloud restart || true fi fi diff --git a/tools/eucalyptus-cc.in b/tools/eucalyptus-cc.in index ba8ca0e6dbb..da8da5a483f 100755 --- a/tools/eucalyptus-cc.in +++ b/tools/eucalyptus-cc.in @@ -108,13 +108,6 @@ if [ -z "$EUCALYPTUS" ] ; then fi export EUCALYPTUS -# just a quick way to check if we have the package still installed: at -# times we can still have the init.d script -if [ ! -x $EUCALYPTUS/usr/sbin/euca_conf ]; then - echo "Some eucalyptus components are missing" - exit 1 -fi - create_httpd_config() { IPS="all" @@ -139,6 +132,10 @@ do_start() { echo "cannot find httpd (was set to <$HTTPD>)!" exit 1 fi + if [ ! -x $EUCALYPTUS/usr/sbin/euca_conf ]; then + echo "Some eucalyptus components are missing" + exit 1 + fi if ! $EUCALYPTUS/usr/sbin/euca_conf --check cc ; then exit 1 diff --git a/tools/eucalyptus-cloud.in b/tools/eucalyptus-cloud.in index 1384bb06c69..901fe6385e8 100755 --- a/tools/eucalyptus-cloud.in +++ b/tools/eucalyptus-cloud.in @@ -129,20 +129,18 @@ if [ -r $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf ]; then echo "Warning: you should check EUCALYPTUS in conf file" fi else + # on removal of RPM we can get in a state in which the conf file + # is gone but the services are still running: make this hard + # failure only if we are not stopping echo "Cannot find eucalyptus configuration file!" - exit 1 + if [ "$1" != "stop" ]; then + exit 1 + fi fi export EUCALYPTUS pidfile=$EUCALYPTUS/var/run/eucalyptus/eucalyptus-cloud.pid -# just a quick way to check if we have the package still installed: at -# times we can still have the init.d script -if [ ! -x $EUCALYPTUS/usr/sbin/euca_conf ]; then - echo "Some eucalyptus components are missing" - exit 1 -fi - # read in the services which should be running read_ws_list() { STORAGE_WS="N" @@ -209,6 +207,11 @@ do_start() { local OPTS="" # basic checks + if [ ! -x $EUCALYPTUS/usr/sbin/euca_conf ]; then + echo "Some eucalyptus components are missing" + exit 1 + fi + check_java cd $EUCALYPTUS/etc/eucalyptus @@ -216,12 +219,21 @@ do_start() { # enabled services if [ "$STORAGE_WS" != "Y" ]; then OPTS="$OPTS --disable-storage" + if ! $EUCALYPTUS/usr/sbin/euca_conf --check sc ; then + exit 1 + fi fi if [ "$WALRUS_WS" != "Y" ]; then OPTS="$OPTS --disable-walrus" + if ! $EUCALYPTUS/usr/sbin/euca_conf --check walrus ; then + exit 1 + fi fi if [ "$CLOUD_WS" != "Y" ]; then OPTS="$OPTS --disable-cloud" + if ! $EUCALYPTUS/usr/sbin/euca_conf --check cloud ; then + exit 1 + fi fi if [ "${STORAGE_WS}${CLOUD_WS}${WALRUS_WS}" = "NNN" ]; then diff --git a/tools/eucalyptus-nc.in b/tools/eucalyptus-nc.in index 997454326e0..8e7d0c03b72 100755 --- a/tools/eucalyptus-nc.in +++ b/tools/eucalyptus-nc.in @@ -111,13 +111,6 @@ if [ -z "$EUCALYPTUS" ] ; then fi export EUCALYPTUS -# just a quick way to check if we have the package still installed: at -# times we can still have the init.d script -if [ ! -x $EUCALYPTUS/usr/sbin/euca_conf ]; then - echo "Some eucalyptus components are missing" - exit 1 -fi - create_httpd_config() { IPS="all" @@ -146,6 +139,10 @@ do_start() { echo "cannot find httpd (was set to <$HTTPD>)!" exit 1 fi + if [ ! -x $EUCALYPTUS/usr/sbin/euca_conf ]; then + echo "Some eucalyptus components are missing" + exit 1 + fi if ! $EUCALYPTUS/usr/sbin/euca_conf --check nc ; then exit 1