Commit graph

4531 commits

Author SHA1 Message Date
Pedro Algarvio
1cbcb11aa5 Added 2 config related test cases.
* Check if we fail if the passed configuration directory does not exist.
* Check if we fail if no configuration is actually done.
2013-02-13 16:39:31 +00:00
Pedro Algarvio
07f3f2e998 Better explain what's going on. Fail if in config only mode and nothing was configured.
* We now explain what we are installing or configuring.
* In case of just configuring and no config files or keys were copied over, fail execution.
2013-02-13 16:39:23 +00:00
Pedro Algarvio
849162a9fd Some getopts and logic fixes. Added one test case for config only mode.
* `getopt` was ignoring `-C`.
* Fixed some logic which should stop execution in some cases(regarding the config only mode execution)
* Added a test case to test if script execution stops if config mode is enabled and no config dir is provided.
2013-02-13 16:38:37 +00:00
Pedro Algarvio
1580be9757 Minor, picky, alignment. 2013-02-13 16:37:37 +00:00
Pedro Algarvio
abfd235bf6 Initial code to support #33. 2013-02-13 16:37:29 +00:00
Pedro Algarvio
89607dcddb Ubuntu's start daemons function is not meant for git installs only. 2013-02-13 16:24:04 +00:00
Pedro Algarvio
327287bb33 Catch errno 11 even when not streaming. 2013-02-13 14:25:51 +00:00
Pedro Algarvio
ef116ee139 When un-installing a non installed package on Ubuntu, the error code is 100. 2013-02-13 12:56:56 +00:00
Pedro Algarvio
f9227cd32a Support daemons **re**start on SmartOS installations. Refs #33. 2013-02-13 12:37:21 +00:00
Pedro Algarvio
3a72a09d89 Support daemons **re**start on FreeBSD installations. Refs #33. 2013-02-13 12:33:42 +00:00
Pedro Algarvio
6a28910ef2 Support daemons **re**start on Arch installations. Refs #33. 2013-02-13 12:31:51 +00:00
Pedro Algarvio
70981a5c1e Support daemons **re**start on CentOS/RHLE/RHL/Amazon Linux installations. Refs #33. 2013-02-13 12:28:00 +00:00
Pedro Algarvio
31c2305483 Support daemons **re**start on Fedora installations. Refs #33. 2013-02-13 12:22:47 +00:00
Pedro Algarvio
6b48ef670b Support daemons **re**start on debian installations. Refs #33. 2013-02-13 12:19:08 +00:00
Pedro Algarvio
12f194b5ad When starting daemons on Ubuntu, first stop and then start.
Earlier versions of the upstart script did not support restart. So, it's safer to stop and then start.
2013-02-13 12:15:56 +00:00
Pedro Algarvio
0a764286d3 Use printf for coloured output since using echo requires some support testing. 2013-02-12 23:16:33 +00:00
Pedro Algarvio
b3a025447b Merge pull request #50 from s0undt3ch/issues/46
Properly handle CentOS/RHEL 5 git installations. Fixes #46.
2013-02-12 14:47:41 -08:00
Pedro Algarvio
7547407c85 Properly handle CentOS/RHEL 5 git installations. Fixes #46. 2013-02-12 22:44:12 +00:00
Pedro Algarvio
7d6f9ebdfc At least CentOS 5.9 was being detected as RHEL. 2013-02-12 22:36:05 +00:00
Pedro Algarvio
10d883163f Merge branch 'develop' of github.com:saltstack/salt-bootstrap into develop 2013-02-12 21:27:29 +00:00
Pedro Algarvio
879fe15e08 Fix sed regex in DISTRO_MINOR_VERSION detection. 2013-02-12 21:26:41 +00:00
Pedro Algarvio
b07fe1cc93 Merge pull request #49 from s0undt3ch/develop
Major and Minor version matching
2013-02-12 13:23:18 -08:00
Pedro Algarvio
d1cc0760f6 Adapted FreeBSD functions to the recently version matching. Refs #37.
Added `DISTRO_MAJOR_VERSION` to `BS_PACKAGESITE` as suggested by @geoffgarside. Refs #47.
2013-02-12 21:18:57 +00:00
Pedro Algarvio
1bc97bc93e Merge branch 'develop' of github.com:saltstack/salt-bootstrap into develop 2013-02-12 21:16:29 +00:00
Pedro Algarvio
d5166b8942 Merge pull request #47 from geoffgarside/freebsd91
FreeBSD 9.1 support + start daemons
2013-02-12 13:16:07 -08:00
Pedro Algarvio
670fe30ca6 Added support for both major and minor version matching.
Added a bit more of complexity since we can now match functions by major version only, or major and minor version. This will improve arithmetic comparisons sometimes required when choosing which piece of code gets executed.
2013-02-12 21:12:57 +00:00
Geoff Garside
9691062803 Add name to header. 2013-02-12 20:58:50 +00:00
Geoff Garside
557564223b Add @s0undt3ch provided fixes, many thanks. 2013-02-12 20:58:03 +00:00
Pedro Algarvio
e9eb656006 Error out when we cannot add EPEL repository support. 2013-02-12 20:23:58 +00:00
Raymond Barbiero
8f443754e9 Replaced DISTRO_VERSION_NO_DOTS string slice with DISTRO_MAJOR_VERSION variable. This should be more future proof. 2013-02-12 20:22:01 +00:00
Geoff Garside
64e2cb0007 Add swig to list of test_install cleanup items. 2013-02-12 20:21:05 +00:00
Geoff Garside
b23dd262a8 Add FreeBSD test_install cleanup rules.
To the `pkg autoremove` command will remove any packages from the system
which are not currently depended on by any other packages.
2013-02-12 19:27:11 +00:00
Geoff Garside
adc5030b36 Add FreeBSD detection to bootstrap.ext.os_data 2013-02-12 19:21:13 +00:00
Geoff Garside
f9b8ff818c Store PACKAGESITE in BS_PACKAGESITE.
If the PACKAGESITE environment variable is set then we will use that
value, otherwise we calculate a sensible default and use that instead.
2013-02-12 19:10:38 +00:00
Geoff Garside
506518a561 Remove duped lines now $fname checks are gone. 2013-02-12 18:48:11 +00:00
Geoff Garside
2abe9fb03c Remove redundant $fname tests when copying configs.
Testing for the sample file existence will protect against the lack of a
syndic.sample file.
2013-02-12 18:44:06 +00:00
Pedro Algarvio
f6080c0422 Allow tweaking colour support from an environment variable.
* Passing something like `BS_COLORS=0` disables colour support and is the same as passing `-N` to the script.
2013-02-12 18:35:31 +00:00
Geoff Garside
5545aa6cfd Make {master,minion}.sample config copying safer.
We make sure they exist first :)
2013-02-12 18:33:07 +00:00
Geoff Garside
f7d14732a4 Copy {master,minion}.sample files if enabled. 2013-02-12 17:59:28 +00:00
Geoff Garside
01bd681a32 Use suggested form for DISTRO_NAME_L final sed. 2013-02-12 17:52:47 +00:00
Geoff Garside
e796bb2941 Allow PACKAGESITE to be overridden by env variable.
If the PACKAGESITE environment variable is not set then the normal
pkgbeta URL will be generated, if the variable is set then this will be
used in preference to the pkgbeta URL.
2013-02-12 00:21:35 +00:00
Geoff Garside
36d0260dcc Fix DISTRO_NAME_L for FreeBSD.
I've tested this with Ubuntu as well as FreeBSD and the [[:space:]]
method appears to work successfully across both OS's.
2013-02-11 23:59:35 +00:00
Geoff Garside
f7559790ef Protect from spamming /etc/rc.conf repeatedly.
The _post functions can be run multiple times. Make sure we don't write
the same string into /etc/rc.conf more than once.
2013-02-11 23:56:04 +00:00
Geoff Garside
451d86afb6 Add start daemons support for FreeBSD. 2013-02-11 23:15:37 +00:00
Geoff Garside
a6ca69b9b4 FreeBSD update salt package -> sysutils/py-salt.
The salt package was renamed to the py- prefix to match other python
based ports. When built the name will be given a shortname of py27-salt,
in order to avoid Python versioning issues in the future we use the full
portname "sysutils/py-salt" which should always find the appropriate
version.
2013-02-11 23:01:15 +00:00
Geoff Garside
0845b9dbcb Add support for FreeBSD 9.1 as well as 9.0. 2013-02-11 23:01:15 +00:00
Pedro Algarvio
7792f4c8c0 Add an horizontal ruler in the readme. 2013-02-11 22:36:05 +00:00
Pedro Algarvio
67deb7dc83 Also include the daemons restart info in the script's documentation. 2013-02-11 22:35:49 +00:00
Pedro Algarvio
7adc8718c2 Update README.rst to include the newly added start daemons function. 2013-02-11 22:28:00 +00:00
Pedro Algarvio
062fe28091 Define truth values to use within the script. Omit debug output while still allowing it to show up with the -D flag. 2013-02-11 20:44:46 +00:00