9 Commits

Author SHA1 Message Date
Vincent Untz
00011c0847 Add is_fedora and exit_distro_not_supported functions
Between is_fedora, is_ubuntu and is_suse, we can make the code a bit
simpler to read. We also use exit_distro_not_supported to identify
places where we need implementation details for new distros.

As "/sbin/service --skip-redirect" is Fedora-specific, guard this with a
is_fedora test too.

Change-Id: Ic77c0697ed9be0dbb5df8e73da93463e76025f0c
2012-12-07 09:06:07 +01:00
Dean Troyer
e83356217b Fix ini functions to handle spaces in section names
This allows section names to look like:

[ default ]

OpenSSL is the primary offender for this usage.

Change-Id: If5c711107e73cebab9d4a26ca02a7ce572224377
2012-11-27 17:00:16 -06:00
Vincent Untz
71ebc6ff65 Add is_package_installed function to know if a package is installed
This helps reduce the distro-dependent code in stack.sh, and also fixes
the bug where "rpm -qa | grep sudo" will work if gnome-sudoku is
installed.

Rebased

Change-Id: Ib1330b29b915b41d9724197edd791f0d4e0fe373
2012-09-09 17:40:19 -05:00
Doug Hellmann
f04178fd12 add functions to manipulate ENABLED_SERVICES
Editing ENABLED_SERVICES directly can get tricky when
the user wants to disable something. This patch includes
two new functions for adding or removing services
safely, and a third (for completeness) to clear the
settings entirely before adding a minimal set of
services.

It also moves the logic for dealing with "negated"
services into a function so it can be tested and
applied by the new functions for manipulating
ENABLED_SERVICES.

Change-Id: I88f205f3666b86e6f0b6a94e0ec32a26c4bc6873
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2012-07-06 15:52:06 -04:00
Vincent Untz
bf3923174e Remove test.ini when done with it during tests
The file is created in the tests, and so should also be removed.

Change-Id: I8c087cc5cc71ac80b7c4974e2a69a747a929bedf
2012-06-14 15:52:44 +02:00
Dean Troyer
09e636e435 B) Use keystone config files from source; move to /etc/keystone
* Put all config files in /etc/keystone
* keystone.conf rewritten
* logging.conf.sample rewritten to logging.conf
* default_catalog.templates copied from devstack/files
* iniset() now properly adds options that do not previously exist

Fixed to re-configure the catalog templated backend; sql is the
default in trunk now but DevStack needs a bit more work before
it can use it.

Change-Id: Ic7060ef897e47495cd08ca3786e49fdebadf6723
2012-04-05 18:10:13 -05:00
Dean Troyer
13dc5ccd13 A) Add/move functions to 'functions' file
Add ini*() and tests
Add GetOSVersion()
Add install_package(), yum_install()
Add *_service()

Rebased

Change-Id: I570dba5ed4d2b988cdd1771cf6bed0aaf8e0fe27
2012-03-29 20:35:04 -05:00
Dean Troyer
27e326995a Simplify die_if_error
* Replace die_if_error() with the simpler die()
* Attempt to clean up unnecessary trace output
* Formatting cleanups on all exercise scripts

Change-Id: I72a542b3a59ee9bf12bee6bcc605edd7579205e0
2012-03-19 10:06:15 -05:00
Dean Troyer
489bd2a62b Improve exercise robustness
* Test returns and exit codes on most command invocations
* Add start and end banners to make output easier to find in
  long log files
* Adds die_if_error(), die_if_not_set() and is_set() to functions
* Add some function tests

Fixes bug 944593

Change-Id: I55e2962c5fec9aad237b674732b1e922ad37a62e
2012-03-02 17:55:37 -08:00