From 58b86bd11a5755312dc65c7e6bab81fa61e9f23e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 17 Mar 2013 22:45:31 +0000 Subject: [PATCH] Some more debugging in `install_ubuntu_restart_daemons`. --- bootstrap-salt.sh | 11 +++++++++-- tests/bootstrap/test_install.py | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index c7f3cdc..3ffc77f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -935,16 +935,23 @@ install_ubuntu_restart_daemons() { # upstart knows about this service, let's stop and start it. # We could restart but earlier versions of the upstart script # did not support restart, so, it's safer this way - /sbin/initctl stop salt-$fname + /sbin/initctl stop salt-$fname || echodebug "Failed to stop salt-$fname" /sbin/initctl start salt-$fname [ $? -eq 0 ] && continue # We failed to start the service, let's test the SysV code bellow - echodebug "Failed to stop/start salt-$fname" + echodebug "Failed to start salt-$fname" fi fi + + if [ ! -f /etc/init.d/salt-$fname ] + echoerror "No init.d support for salt-$fname was found" + return 1 + fi + /etc/init.d/salt-$fname stop > /dev/null 2>&1 /etc/init.d/salt-$fname start done + return 0 } # # End of Ubuntu Install Functions diff --git a/tests/bootstrap/test_install.py b/tests/bootstrap/test_install.py index b654353..4b0465e 100644 --- a/tests/bootstrap/test_install.py +++ b/tests/bootstrap/test_install.py @@ -231,7 +231,7 @@ class InstallationTestCase(BootstrapTestCase): ) def test_install_daily(self): - args = ['-D'] + args = [] if GRAINS['os'] in OS_REQUIRES_PIP_ALLOWED: args.append('-P') @@ -325,7 +325,7 @@ class InstallationTestCase(BootstrapTestCase): if GRAINS['os'] in OS_REQUIRES_PIP_ALLOWED: args.append('-P') - args.extend(['git', 'v0.13.1']) + args.extend(['git', 'v0.13.2']) self.assert_script_result( 'Failed to install using specific git tag', @@ -555,7 +555,7 @@ class InstallationTestCase(BootstrapTestCase): if GRAINS['os'] in OS_REQUIRES_PIP_ALLOWED: args.append('-P') - args.extend(['git', 'v0.13.1']) + args.extend(['git', 'v0.13.2']) self.assert_script_result( 'Failed to install using specific git tag',