Commit c673a1b3 authored by benoit manager's avatar benoit manager

Merge branch '1.2.2-fixes' into 'master'

Merge 1.2.2 fixes onto master

See merge request argonaut/argonaut!110
parents a9b241f7 341106b2
## %"Argonaut 1.2.3" - 2019-01-10
### Changed
#### argonaut
- argonaut#5678 the reverse for slave should be written in is own file not included in the first slave domain
### Fixed
#### argonaut
- argonaut#5687 Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Argonaut/Server/Modules/OPSI.pm line 309.
## %"Argonaut 1.2.2" - 2018-12-12
### Added
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-CLIENT 1"
.TH ARGONAUT-CLIENT 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-CLIENT 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT.CONF 1"
.TH ARGONAUT.CONF 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT.CONF 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-DEBCONF-CRAWLER 1"
.TH ARGONAUT-DEBCONF-CRAWLER 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-DEBCONF-CRAWLER 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-REPOSITORY 1"
.TH ARGONAUT-REPOSITORY 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-REPOSITORY 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-FAI-MONITOR 1"
.TH ARGONAUT-FAI-MONITOR 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-FAI-MONITOR 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-LDAP2FAI 1"
.TH ARGONAUT-LDAP2FAI 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-LDAP2FAI 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "FAI2LDIF 1"
.TH FAI2LDIF 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH FAI2LDIF 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "YUMGROUP2YUMI 1"
.TH YUMGROUP2YUMI 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH YUMGROUP2YUMI 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-FUSE 1"
.TH ARGONAUT-FUSE 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-FUSE 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-CLEAN-AUDIT 1"
.TH ARGONAUT-CLEAN-AUDIT 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-CLEAN-AUDIT 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-USER-REMINDER 1"
.TH ARGONAUT-USER-REMINDER 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-USER-REMINDER 1 "2018-12-12" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -136,16 +136,23 @@ sub argonaut_ldap2zone
} elsif ($slavefiles) {
print "Updating all slave files\n" if $verbose;
my @zones = @{$settings->{'slavefiles'}};
my $all_reverse_zones = [];
my @all_reverse_zones = ();
foreach (@zones) {
my ($zoneName, $masterline, $reverse) = split /\|/, $_, 3;
print "Updating slave $zoneName\n" if $verbose;
create_slave_namedconf($zoneName,$masterline,$BIND_DIR,$BIND_CACHE_DIR,$output_BIND_DIR,$verbose);
my $zonedn = zonesearch($ldap,$ldap_base,$zoneName,$verbose);
my $reverse_zones = [];
if ($zonedn and ($reverse ne 'noreverse')) {
$reverse_zones = get_reverse_zones($ldap,$ldap_base,$zonedn);
my $reverse_zones = get_reverse_zones($ldap,$ldap_base,$zonedn);
foreach my $reverse_zone (@$reverse_zones) {
if (grep {$_ eq $reverse_zone} @all_reverse_zones) {
# this avoids treating twice the same reverse zone
next;
}
push @all_reverse_zones, $reverse_zone;
create_slave_namedconf($reverse_zone,$masterline,$BIND_DIR,$BIND_CACHE_DIR,$output_BIND_DIR,$verbose);
}
}
create_slave_namedconf($zoneName,$masterline,$reverse_zones,$BIND_DIR,$BIND_CACHE_DIR,$output_BIND_DIR,$verbose,$all_reverse_zones);
}
} else {
if (substr($zone,-1) ne ".") { # If the end point is not there, add it
......@@ -489,7 +496,7 @@ Returns :
=cut
sub create_slave_namedconf
{
my($zone,$masterline,$reverse_zones,$BIND_DIR,$BIND_CACHE_DIR,$output_BIND_DIR,$verbose,$all_reverse_zones) = @_;
my($zone,$masterline,$BIND_DIR,$BIND_CACHE_DIR,$output_BIND_DIR,$verbose) = @_;
if (substr($masterline,-1) ne ";") {
# If the end semi-colon is not there, add it
......@@ -508,21 +515,6 @@ zone "$zone" {
file "$BIND_CACHE_DIR/db.$zone";
};
EOF
foreach my $reverse_zone (@$reverse_zones) {
if (grep {$_ eq $reverse_zone} @$all_reverse_zones) {
# this avoids having twice the same reverse zones in slave conf
next;
}
push @$all_reverse_zones, $reverse_zone;
print "Writing reverse zone '$reverse_zone'\n" if $verbose;
print $namedfile <<EOF;
zone "$reverse_zone" {
type slave;
masters {$masterline};
file "$BIND_CACHE_DIR/db.$reverse_zone";
};
EOF
}
close $namedfile;
}
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-LDAP2ZONE 1"
.TH ARGONAUT-LDAP2ZONE 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-LDAP2ZONE 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-QUOTA 1"
.TH ARGONAUT-QUOTA 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-QUOTA 1 "2018-09-26" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -57,8 +57,6 @@ my @locked_actions = (
'OPSI.host_getObjects', 'OPSI.get_netboots', 'OPSI.get_localboots',
);
my $settings;
sub new
{
my ($class) = @_;
......@@ -309,7 +307,7 @@ sub reinstall_or_update {
attrs => ['fdOpsiNetbootProduct', 'fdOpsiSoftwareList', 'fdOpsiProductProperty']
);
if ($mesg->count <= 0) {
die "[OPSI] Client with OPSI activated but profile '".$settings->{'profile-dn'}."' could not be found";
die "[OPSI] Client with OPSI activated but profile '".$self->{'profile-dn'}."' could not be found";
}
$self->{'netboot'} = ($mesg->entries)[0]->get_value("fdOpsiNetbootProduct");
$self->{'softlists'} = ($mesg->entries)[0]->get_value("fdOpsiSoftwareList", asref => 1);
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-SERVER 1"
.TH ARGONAUT-SERVER 1 "2018-09-26" "Argonaut 1.2.2" "Argonaut Documentation"
.TH ARGONAUT-SERVER 1 "2018-12-12" "Argonaut 1.2.3" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment