Skip to content

Commit

Permalink
skip icinga2 on sles11 systems
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Apr 19, 2018
1 parent 0d69a52 commit bd1f709
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile.omd
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ MODULE_DIR=$(APACHE_MODULE_DIR)
ifeq ($(shell uname -m),x86_64)
MODULE_DIR=$(APACHE_MODULE_DIR_64)
endif

# skip some packages on some distros
ifdef SKIP_PACKAGES
PACKAGES:=$(shell for p in $(PACKAGES); do skip=0; for s in $(SKIP_PACKAGES); do if [ "$$s" = "$$p" ]; then skip=1; fi; done; if [ $$skip -eq 0 ]; then echo $$p; fi; done)
endif
1 change: 1 addition & 0 deletions distros/Makefile.SLES_11
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ APACHE_ENMOD = a2enmod %s
BECOME_ROOT = su -c
MOUNT_OPTIONS =
INIT_CMD = /etc/init.d/%(name)s %(action)s
SKIP_PACKAGES = icinga2
1 change: 1 addition & 0 deletions distros/Makefile.SLES_11SP1
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ APACHE_ENMOD = a2enmod %s
BECOME_ROOT = su -c
MOUNT_OPTIONS =
INIT_CMD = /etc/init.d/%(name)s %(action)s
SKIP_PACKAGES = icinga2
1 change: 1 addition & 0 deletions distros/Makefile.SLES_11SP2
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ APACHE_ENMOD = a2enmod %s
BECOME_ROOT = su -c
MOUNT_OPTIONS =
INIT_CMD = /etc/init.d/%(name)s %(action)s
SKIP_PACKAGES = icinga2
1 change: 1 addition & 0 deletions distros/Makefile.SLES_11SP3
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ APACHE_ENMOD = a2enmod %s
BECOME_ROOT = su -c
MOUNT_OPTIONS =
INIT_CMD = /etc/init.d/%(name)s %(action)s
SKIP_PACKAGES = icinga2
1 change: 1 addition & 0 deletions distros/Makefile.SLES_11SP4
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ APACHE_ENMOD = a2enmod %s
BECOME_ROOT = su -c
MOUNT_OPTIONS =
INIT_CMD = /etc/init.d/%(name)s %(action)s
SKIP_PACKAGES = icinga2
1 change: 1 addition & 0 deletions t/03-distro-makefiles.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ for my $file (keys %{$all_confs}) {
for my $key (keys %{$all_keys}) {
next if $key eq 'ARCH'; # arch is debian specific
next if $key eq 'CONFIG_SITE'; # CONFIG_SITE is OpenSuSE specific
next if $key eq 'SKIP_PACKAGES'; # SKIP_PACKAGES is optional
ok(exists($all_confs->{$file}->{$key}), "$file: $key");
}
}
Expand Down
1 change: 1 addition & 0 deletions t/36-histou.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ BEGIN {

my $php_version = `php -v`;
$php_version =~ s%^PHP\ (\d\.\d).*%$1%gmsx;
plan skip_all => "icinga2 not included, cannot test" unless -x '/omd/versions/default/bin/icinga2';
plan( skip_all => 'histou requires at least php 5.3') if $php_version < 5.3;
plan( tests => 49 );

Expand Down

0 comments on commit bd1f709

Please sign in to comment.