Skip to content

Commit 62f5c13

Browse files
committed
Fix non-breaking whitespaces in the post-install script
1 parent affa247 commit 62f5c13

File tree

5 files changed

+23
-20
lines changed

5 files changed

+23
-20
lines changed

alignak/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
This module provide Alignak current version
33
"""
44

5-
VERSION = "1.1.0rc6"
5+
VERSION = "1.1.0rc7"

bin/post-install.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ echo "-----"
2727
echo "Detecting OS platform"
2828
platform='unknown'
2929
unamestr=`uname`
30-
if [[ "$unamestr" == 'Linux' ]]; then
30+
echo "-> system is: $unamestr"
31+
if [ "$unamestr" = 'Linux' ]; then
3132
platform='linux'
32-
elif [[ "$unamestr" == 'FreeBSD' ]]; then
33+
elif [ "$unamestr" = 'FreeBSD' ]; then
3334
platform='freebsd'
3435
fi
3536
echo "-> found ${platform}"
36-
if [[ $platform == 'linux' ]]; then
37+
if [ "$platform" = 'linux' ]; then
3738
## Create user and group
3839
echo "Checking / creating '$ACCOUNT' user and users group"
3940
id -u $ACCOUNT &>/dev/null || useradd $ACCOUNT --system --no-create-home --user-group -c "Alignak daemons user"
@@ -43,10 +44,10 @@ if [[ $platform == 'linux' ]]; then
4344
# getent group nagios || groupadd nagios
4445
#
4546
# ## Add user to nagios group
46-
# id -Gn $ACCOUNT |grep -E '(^|[[:blank:]])nagios($|[[:blank:]])' >/dev/null ||
47+
# id -Gn $ACCOUNT |grep -E '(^|[:blank:])nagios($|[:blank:])' >/dev/null ||
4748
# echo "Adding user '$ACCOUNT' to the nagios users group"
4849
# usermod -a -G nagios $ACCOUNT
49-
elif [[ $platform == 'freebsd' ]]; then
50+
elif [ "$platform" = 'freebsd' ]; then
5051
## Create user and group
5152
echo "Checking / creating '$ACCOUNT' user and users group"
5253
id -u $ACCOUNT &>/dev/null || pw adduser $ACCOUNT -d /nonexistent -s /usr/sbin/nologin -c "Alignak daemons user"

etc/alignak.d/daemons.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This daemon name is usually built with the daemon type (eg. arbiter, poller,...) and the
44
# daemon name separated with a dash.
55
#
6-
# The previous rules ensure that Alignak will be able to find all the daemons configuration
6+
# The previous rules ensure that Alignak will be able to find all the daemons configuration
77
# in this file whatever the number of daemons is existing in the configuration
88
#
99
# To be easily used as a configuration variable of this file, the daemon name is repeated
@@ -41,7 +41,7 @@ name=scheduler-master
4141
; My listening interface
4242
;host=0.0.0.0
4343
port=7768
44-
# My adress for the other daemons
44+
; My adress for the other daemons
4545
;address=127.0.0.1
4646

4747
; Modules
@@ -165,7 +165,7 @@ port=7772
165165
max_queue_size=100000
166166

167167
; Gets the arbiter broks
168-
; There must only be one and only one broker that gets the broks created by the arbiter
168+
; There must only be one and only one broker that gets the broks created by the arbiter
169169
; Do not set this parameter for all other brokers because it defaults to False.
170170
manage_arbiters=1
171171

etc/alignak.ini

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#
2-
# This configuration file is the main Alignak configuration entry point. Each Alignak installer
3-
# will adapt the content of this file according to the installation process. This will allow
4-
# any Alignak extension or third party application to find where the Alignak components and
5-
# files are located on the system.
6-
#
7-
# ---
8-
# This version of the file contains variable that are suitable to run a single node Alignak
9-
# with all its daemon using the default configuration existing in the repository.
10-
#
1+
;
2+
; This configuration file is the main Alignak configuration entry point. Each Alignak installer
3+
; will adapt the content of this file according to the installation process. This will allow
4+
; any Alignak extension or third party application to find where the Alignak components and
5+
; files are located on the system.
6+
;
7+
; ---
8+
; This version of the file contains variable that are suitable to run a single node Alignak
9+
; with all its daemon using the default configuration existing in the repository.
10+
;
1111

1212

1313
; Declaring script macros

tests_integ/test_daemons_api.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def setUp(self):
6464
super(TestDaemonsApi, self).setUp()
6565

6666
self.cfg_folder = '/tmp/alignak'
67+
if os.path.exists(self.cfg_folder):
68+
shutil.rmtree(self.cfg_folder)
6769
cfg_dir = 'default_many_hosts'
6870
hosts_count = 10
6971
daemons_list = ['broker-master', 'poller-master', 'reactionner-master',
@@ -1247,7 +1249,7 @@ def _get_stats(self, req, satellite_map, details, run=False):
12471249
if name in ['scheduler']:
12481250
assert "livesynthesis" in data
12491251
livesynthesis = data['livesynthesis']
1250-
print("%s, my livesythesis: %s" % (name, livesynthesis))
1252+
print("%s, my livesynthesis: %s" % (name, livesynthesis))
12511253
if not run:
12521254
assert livesynthesis["hosts_total"] == 13
12531255
assert livesynthesis["hosts_up_hard"] == 13

0 commit comments

Comments
 (0)