Commit b72b1bc4 authored by Mortier Benoit's avatar Mortier Benoit

Merge branch 'argonaut-0.9.3-fixes'

Releasing Argonaut 0.9.4
parents 3ba77c92 1b01e3c0
......@@ -11,10 +11,11 @@ documentation and additional help.
* Antoine Gallavardin <antoine.gallavardin@free.fr>
Quota original code
* Bernigaud Côme <come.bernigaud@laposte.net>
* Bernigaud Côme <come.bernigaud@opensides.be>
All the new deployment stuff :)
* Samuel Bosquin <samuel.bosquin@ibcp.fr>
Help and test with the RPM code and FAI
* Jonathan Swaelens <jonathan@opensides.be>
QA, Testing, Systemd units
Argonaut changelog
==================
* Argonaut 0.9.4
[Fix] Bugs #4110: Remove all uses of gotoBootKernel
[Fix] Bugs #4291: Error when I try to grab centos packages with an argonaut-server on centos
[Fix] Bugs #4293: Problem when I try to restart a service on Centos7
[Fix] Bugs #4322: generate-fusioninventory-schema should read Agent/Inventory.pm directly from an installed fusioninventory-agent
[Fix] Bugs #4355: Use App::Daemon for argonaut-fai-monitor and argonaut-fuse
* Argonaut 0.9.3
[Feature] Bugs #943: argonaut should work on ssl mode https
......
......@@ -70,8 +70,8 @@ sub manage : Public {
my ($service,$action) = @{$args};
my $folder = getServiceName("folder");
my $exec = getServiceName($service);
$main::log->notice("manage service called: $service ($folder/$exec) $action");
system ("$folder/$exec $action\n") == 0 or die "$folder/$exec $action returned error $?";;
$main::log->notice("manage service called: $service ($folder$exec) $action");
system ("$folder$exec $action\n") == 0 or die "$folder$exec $action returned error $?";;
return "done : $action $exec";
}
......@@ -83,8 +83,8 @@ sub is_running : Public {
my ($service) = @{$args};
my $folder = getServiceName("folder");
my $exec = getServiceName($service);
$main::log->notice("is_running service called: $service ($folder/$exec) status");
my $lsb_code = system ("$folder/$exec status\n");
$main::log->notice("is_running service called: $service ($folder$exec) status");
my $lsb_code = system ("$folder$exec status\n");
if ($lsb_code == 0) {
return "yes";
} else {
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-CLIENT 1"
.TH ARGONAUT-CLIENT 1 "2015-08-17" "Argonaut 0.9.3" "Argonaut Documentation"
.TH ARGONAUT-CLIENT 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -628,8 +628,7 @@ sub argonaut_get_generic_settings {
my $mesg = $ldap->search( # perform a search
base => $ldap_base,
filter => "(&(objectClass=$objectClass)$filter)",
attrs => ['macAddress','gotoMode','ipHostNumber',values(%{$params})]
filter => "(&(objectClass=$objectClass)$filter)"
);
my $settings = {
......
......@@ -91,7 +91,7 @@ sub get_repolines {
my @repolines = ();
foreach my $entry ($mesg->entries()) {
foreach my $repoline ($entry->get_value('FAIrepository')) {
my ($uri,$parent,$release,$sections,$install,$local,$archs,$dist) = split('\|',$repoline);
my ($uri,$parent,$release,$sections,$install,$local,$archs,$dist,$pathmask) = split('\|',$repoline);
my $sections_array = [split(',',$sections)];
if ($install eq 'update') {
foreach my $section (@$sections_array) {
......@@ -109,7 +109,8 @@ sub get_repolines {
'installrepo' => $install,
'localmirror' => ($local eq "local"),
'archs' => [split(',',$archs)],
'dist' => $dist
'dist' => $dist,
'pathmask' => $pathmask
};
push @repolines, $repo;
}
......@@ -202,7 +203,11 @@ sub parse_package_list_centos {
}
$handler->{packages} = $distributions->{$repo->{'release'}."/$section"};
foreach my $arch (@{$repo->{'archs'}}) {
my $primary_file = "$packages_folder/$localuri/".$repo->{'release'}."/$section/$arch/primary.xml";
my $relpath = $repo->{'pathmask'};
$relpath =~ s/%RELEASE%/$repo->{'release'}/i;
$relpath =~ s/%SECTION%/$section/i;
$relpath =~ s/%ARCH%/$arch/i;
my $primary_file = "$packages_folder/$localuri/".$relpath."/primary.xml";
eval {
$parser->parse_uri($primary_file);
};
......@@ -398,23 +403,25 @@ sub store_package_list_centos {
);
foreach my $section (@{$repo->{'sections'}}) {
my $relpath = $repo->{'release'}."/$section";
foreach my $arch (@{$repo->{'archs'}}) {
my $repodata = "/$relpath/$arch/repodata/";
mkpath($dir.$repodata);
my $res = mirror($uri.$repodata."repomd.xml" => $dir.$repodata."repomd.xml");
my $relpath = $repo->{'pathmask'};
$relpath =~ s/%RELEASE%/$repo->{'release'}/i;
$relpath =~ s/%ARCH%/$arch/i;
$relpath =~ s/%SECTION%/$section/i;
mkpath($dir.$relpath."/repodata");
my $res = mirror($uri.$relpath."repodata/repomd.xml" => $dir.$relpath."repodata/repomd.xml");
if(is_error($res)) {
push @errors,"Could not download $uri".$repodata."repomd.xml: $res";
push @errors,"Could not download $uri".$relpath."repodata/repomd.xml: $res";
next;
}
$parser->parse_uri($dir.$repodata."repomd.xml");
$parser->parse_uri($dir.$relpath."repodata/repomd.xml");
my $primary = $parser->{Handler}->{result};
$res = mirror($uri."/$relpath/$arch/".$primary => $dir."/$relpath/$arch/".$primary);
$res = mirror($uri."/$relpath/".$primary => $dir."/$relpath/".$primary);
if(is_error($res)) {
push @errors,"Could not download $uri"."/$relpath/$arch/".$primary.": $res";
push @errors,"Could not download $uri"."/$relpath/".$primary.": $res";
next;
}
gunzip ($dir."/$relpath/$arch/".$primary => $dir."/$relpath/$arch/primary.xml")
gunzip ($dir."/$relpath/".$primary => $dir."/$relpath/primary.xml")
or push @errors,"could not extract Packages file : $GunzipError";
}
}
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-DEBCONF-CRAWLER 1"
.TH ARGONAUT-DEBCONF-CRAWLER 1 "2015-04-22" "Argonaut 0.9.3" "Argonaut Documentation"
.TH ARGONAUT-DEBCONF-CRAWLER 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-REPOSITORY 1"
.TH ARGONAUT-REPOSITORY 1 "2015-04-22" "Argonaut 0.9.3" "Argonaut Documentation"
.TH ARGONAUT-REPOSITORY 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -40,14 +40,14 @@ use Log::Handler;
use Socket;
use Getopt::Std;
use Proc::Daemon;
Proc::Daemon::Init;
use App::Daemon qw(daemonize);
my ($port, $timeout);
our ($opt_h,$opt_p,$opt_t);
my $logfile = "argonaut-fai-monitor.log";
my $piddir = "/var/run/argonaut";
my $pidfile = "argonaut-fai-monitor.pid";
my $config = argonaut_read_config;
......@@ -88,8 +88,14 @@ my %progress_value = (
"savelog" => 90
);
$App::Daemon::pidfile = "$piddir/$pidfile";
$App::Daemon::logfile = "$logdir/$logfile";
$App::Daemon::as_user = "root";
argonaut_create_dir($logdir);
daemonize();
my $log = Log::Handler->create_logger("argonaut-fai-monitor");
$log->add(
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-FAI-MONITOR 1"
.TH ARGONAUT-FAI-MONITOR 1 "2015-08-26" "Argonaut 0.9.3" "Argonaut Documentation"
.TH ARGONAUT-FAI-MONITOR 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -53,7 +53,6 @@ my $dry_run = 0;
my $release_var = 'FAIclientRelease';
my $check_hostname;
my $sources_list;
my $kernel;
my $ldapinfos;
my $mac = '';
my $ip = '';
......@@ -141,8 +140,6 @@ generate_files_dir_configspace();
generate_sources_list( $sections ) if ($sources_list);
generate_kernel_packagelist( $kernel );
$ldap->unbind(); # take down session
$ldap->disconnect();
......@@ -244,7 +241,7 @@ sub get_classes {
$mesg = $ldap->search(
base => "$base",
filter => $filter,
attrs => [ 'FAIclass', 'cn', 'FAIdebianMirror', 'gotoBootKernel' ]);
attrs => [ 'FAIclass', 'cn', 'FAIdebianMirror' ]);
$mesg->code && do_exit( 2, sprintf( "LDAP error: %s (%i)", $mesg->error, __LINE__ ) );
# normally, only one value should be returned
......@@ -267,7 +264,6 @@ sub get_classes {
$entry = ($mesg->entries)[0];
$host_dn = $entry->dn;
$hostname = $entry->get_value( 'cn' );
$kernel = $entry->get_value( 'gotoBootKernel' );
$real_hostname = $hostname;
# set $host_base
......@@ -306,7 +302,7 @@ sub get_classes {
$mesg = $ldap->search(
base => "$base",
filter => $faiobj->prepare_filter( $filter ),
attrs => [ 'FAIclass', 'cn', 'FAIdebianMirror', 'gotoBootKernel' ]);
attrs => [ 'FAIclass', 'cn', 'FAIdebianMirror' ]);
$mesg->code && do_exit( 2, sprintf( "LDAP error: %s (%i)", $mesg->error, __LINE__ ) );
if( 1 != $mesg->count ) {
......@@ -328,14 +324,6 @@ sub get_classes {
print( "Found FAI information in object group '" . $entry->get_value( 'cn' ) . "'\n"
. ' + Object group: ' . $entry->dn() . "\n" )
if( $verbose );
if (not defined $kernel){
$kernel = $entry->get_value( 'gotoBootKernel' );
}
}
if (not defined $kernel){
do_exit( 3, "There is no kernel defined for this client: check the gotoBootKernel attribute!\n" );
}
$fai_mirror = $entry->get_value( 'FAIdebianMirror' );
......@@ -506,29 +494,6 @@ BAILOUT_CHECK_SERVER:
}
}
sub generate_kernel_packagelist {
my $kernel= shift;
my( $mesg, $entry, $line, @deblines, @modsections, @rdns, %saw, $debline );
if ($verbose) {
print "Generate kernel package script for class 'LAST'\n"
. " - kernel: ${kernel}\n"
}
create_dir( "${dump_dir}/scripts/LAST" );
if( ! $dry_run ) {
open (SOURCES,">${dump_dir}/scripts/LAST/99-install-kernel")
|| do_exit( 4, "Can't create ${dump_dir}/scripts/LAST/99-install-kernel. $!\n" );
print SOURCES "#!/bin/sh\n";
print SOURCES "# - automatically created by argonaut-ldap2fai -\n";
print SOURCES "\$ROOTCMD aptitude -o \"Aptitude::CmdLine::Ignore-Trust-Violations=yes\" -y install $kernel\n";
close (SOURCES);
chmod 0700, "${dump_dir}/scripts/LAST/99-install-kernel";
}
}
__END__
=head1 NAME
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-LDAP2FAI 1"
.TH ARGONAUT-LDAP2FAI 1 "2015-04-22" "Argonaut 0.9.3" "Argonaut Documentation"
.TH ARGONAUT-LDAP2FAI 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "FAI2LDIF 1"
.TH FAI2LDIF 1 "2015-04-22" "Argonaut 0.9.3" "Argonaut Documentation"
.TH FAI2LDIF 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "YUMGROUP2YUMI 1"
.TH YUMGROUP2YUMI 1 "2015-04-22" "Argonaut 0.9.3" "Argonaut Documentation"
.TH YUMGROUP2YUMI 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -34,7 +34,7 @@ use Net::LDAP::Util;
use Net::LDAP::Message;
use Net::LDAP::Search;
use Argonaut::Common qw(:ldap);
use Argonaut::Libraries::Common qw(:ldap);
# use ...
# This is very important ! Without this script will not get the filled hashesh from main.
......
......@@ -74,8 +74,6 @@ sub get_pxe_config {
'FAIobject',
{
'status' => 'FAIstate',
'kernel' => 'gotoBootKernel',
'cmdline' => 'gotoKernelParameters',
'hostname' => 'cn',
},
$main::config,"(macAddress=$mac)"
......@@ -111,38 +109,17 @@ sub get_pxe_config {
my $host_dn = $infos->{'dn'};
# Check, if there is still missing information
if ($infos->{'kernel'} eq '') {
$log->error("$filename - missing information - aborting\n");
my $mesg = "$filename - missing LDAP attribs:";
$mesg .= ' gotoBootKernel' if( $infos->{'kernel'} eq '' );
$mesg .= "\n";
$log->info($mesg);
return undef;
}
# Strip ldap parameter and all multiple and trailing spaces
$infos->{'cmdline'} =~ s/ldap(=[^\s]*[\s]*|[\s]*$|\s+)//g;
$infos->{'cmdline'} =~ s/[\s]+$//g;
$infos->{'cmdline'} =~ s/\s[\s]+/ /g;
my $tftp_parent;
if ($main::tftp_root =~ /^(.*?)\/pxelinux.cfg$/) {
$tftp_parent = $1;
}
# Get kernel and initrd from TFTP root
if (($infos->{'kernel'} eq '') || ($infos->{'kernel'} eq 'default') ||
($tftp_parent and not -e "$tftp_parent/$infos->{'kernel'}")) {
$infos->{'kernel'} = 'vmlinuz-install';
}
$infos->{'kernel'} = 'vmlinuz-install';
$infos->{'cmdline'} = '';
if ( $infos->{'kernel'} =~ m/^vmlinuz-(.*)$/ ) {
if ($tftp_parent and -e "$tftp_parent/initrd.img-$1") {
$infos->{'cmdline'} .= " initrd=initrd.img-$1";
}
if ($tftp_parent and -e "$tftp_parent/initrd.img-$1") {
$infos->{'cmdline'} .= " initrd=initrd.img-$1";
}
my $chboot_cmd;
......
......@@ -48,9 +48,7 @@ use Argonaut::Libraries::Common qw(:ldap :config :file);
use constant USEC => 1000000;
use Proc::Daemon;
Proc::Daemon::Init;
use App::Daemon qw(daemonize);
# Predefined variables for config
our ($default_mode, $tftp_root);
......@@ -95,20 +93,13 @@ $log->info("Argonaut-Fuse Started\n");
use Module::Pluggable search_path => 'Argonaut::Fuse::Modules', sub_name => 'modules', require => 1;
import_modules();
argonaut_create_dir($piddir);
my $pid = File::Pid->new({
file => "$piddir/$pidfile",
});
$App::Daemon::pidfile = "$piddir/$pidfile";
$App::Daemon::logfile = "$logdir/$logfile";
$App::Daemon::as_user = "root";
my $pidrunning = $pid->running;
if ($pidrunning) {
die "Argonaut Fuse is already running $pidrunning\n";
}
argonaut_create_dir($piddir);
$pid->pid($$);
$pid->write;
daemonize();
$filesystem = {
'man' => {
......@@ -140,7 +131,7 @@ if ($@) {
exit 0;
sub sig_int_handler {
$pid->remove;
$pidfile->remove;
exit(0);
}
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-FUSE 1"
.TH ARGONAUT-FUSE 1 "2015-08-27" "Argonaut 0.9.3" "Argonaut Documentation"
.TH ARGONAUT-FUSE 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -2,7 +2,7 @@
#######################################################################
#
# generate-fusioninventory-schema
# argonaut-generate-fusioninventory-schema
#
# grab data from fusioniventory and create a proper ldap schema
#
......@@ -26,79 +26,18 @@
#
#######################################################################
use strict;
use warnings;
# This is taken from Agent/Inventory.pm
my %fields = (
ANTIVIRUS => [ qw/COMPANY NAME GUID ENABLED UPTODATE VERSION/ ],
BATTERIES => [ qw/CAPACITY CHEMISTRY DATE NAME SERIAL MANUFACTURER
VOLTAGE/ ],
CONTROLLERS => [ qw/CAPTION DRIVER NAME MANUFACTURER PCICLASS VENDORID
PRODUCTID PCISUBSYSTEMID PCISLOT TYPE REV/ ],
CPUS => [ qw/CACHE CORE DESCRIPTION MANUFACTURER NAME THREAD SERIAL
STEPPING FAMILYNAME FAMILYNUMBER MODEL SPEED ID EXTERNAL_CLOCK ARCH/ ],
DRIVES => [ qw/CREATEDATE DESCRIPTION FREE FILESYSTEM LABEL LETTER
SERIAL SYSTEMDRIVE TOTAL TYPE VOLUMN/ ],
ENVS => [ qw/KEY VAL/ ],
INPUTS => [ qw/NAME MANUFACTURER CAPTION DESCRIPTION INTERFACE LAYOUT
POINTINGTYPE TYPE/ ],
MEMORIES => [qw/CAPACITY CAPTION FORMFACTOR REMOVABLE PURPOSE SPEED
SERIALNUMBER TYPE DESCRIPTION NUMSLOTS MEMORYCORRECTION
MANUFACTURER/ ],
MODEMS => [ qw/DESCRIPTION NAME/ ],
MONITORS => [ qw/BASE64 CAPTION DESCRIPTION MANUFACTURER SERIAL
UUENCODE/ ],
NETWORKS => [ qw/BSSID DESCRIPTION DRIVER FIRMWARE IPADDRESS IPADDRESS6
IPDHCP IPGATEWAY IPMASK IPMASK6 IPSUBNET IPSUBNET6
MANAGEMENT MANUFACTURER MACADDR MODEL MTU PCISLOT
PNPDEVICEID STATUS SLAVES SPEED SSID TYPE VIRTUALDEV
WWN/ ],
PORTS => [ qw/CAPTION DESCRIPTION NAME TYPE/ ],
PROCESSES => [ qw/USER PID CPUUSAGE MEM VIRTUALMEMORY TTY STARTED CMD/ ],
REGISTRY => [ qw/NAME REGVALUE HIVE/ ],
RUDDER => [ qw/AGENT UUID HOSTNAME/ ],
SLOTS => [ qw/DESCRIPTION DESIGNATION NAME STATUS/ ],
SOFTWARES => [ qw/COMMENTS FILESIZE FOLDER FROM HELPLINK INSTALLDATE NAME
NO_REMOVE RELEASE_TYPE PUBLISHER UNINSTALL_STRING
URL_INFO_ABOUT VERSION VERSION_MINOR VERSION_MAJOR
GUID ARCH USERNAME USERID/ ],
SOUNDS => [ qw/CAPTION DESCRIPTION MANUFACTURER NAME/ ],
STORAGES => [ qw/DESCRIPTION DISKSIZE INTERFACE MANUFACTURER MODEL NAME
TYPE SERIAL SERIALNUMBER FIRMWARE SCSI_COID SCSI_CHID
SCSI_UNID SCSI_LUN WWN/ ],
VIDEOS => [ qw/CHIPSET MEMORY NAME RESOLUTION PCISLOT/ ],
USBDEVICES => [ qw/VENDORID PRODUCTID MANUFACTURER CAPTION SERIAL CLASS
SUBCLASS NAME/ ],
USERS => [ qw/LOGIN DOMAIN/ ],
LOCAL_USERS => [ qw/LOGIN ID NAME HOME SHELL/ ],
LOCAL_GROUPS => [ qw/NAME ID MEMBER/ ],
PRINTERS => [ qw/COMMENT DESCRIPTION DRIVER NAME NETWORK PORT RESOLUTION
SHARED STATUS ERRSTATUS SERVERNAME SHARENAME
PRINTPROCESSOR SERIAL/ ],
BIOS => [ qw/SMODEL SMANUFACTURER SSN BDATE BVERSION
BMANUFACTURER MMANUFACTURER MSN MMODEL ASSETTAG
ENCLOSURESERIAL BIOSSERIAL
TYPE SKUNUMBER/ ],
HARDWARE => [ qw/USERID OSVERSION PROCESSORN OSCOMMENTS CHECKSUM
PROCESSORT NAME PROCESSORS SWAP ETIME TYPE OSNAME
IPADDR WORKGROUP DESCRIPTION MEMORY UUID VMID DNS
LASTLOGGEDUSER USERDOMAIN DATELASTLOGGEDUSER
DEFAULTGATEWAY VMSYSTEM WINOWNER WINPRODID
WINPRODKEY WINCOMPANY WINLANG CHASSIS_TYPE VMID
VMNAME VMHOSTSERIAL/ ],
OPERATINGSYSTEM => [ qw/KERNEL_NAME KERNEL_VERSION NAME VERSION FULL_NAME
SERVICE_PACK INSTALL_DATE FQDN DNS_DOMAIN
SSH_KEY ARCH BOOT_TIME/ ],
ACCESSLOG => [ qw/USERID LOGDATE/ ],
VIRTUALMACHINES => [ qw/MEMORY NAME UUID STATUS SUBSYSTEM VMTYPE VCPU
VMID MAC COMMENT OWNER SERIAL/ ],
LOGICAL_VOLUMES => [ qw/LV_NAME VGN_AME ATTR SIZE LV_UUID SEG_COUNT
VG_UUID/ ],
PHYSICAL_VOLUMES => [ qw/DEVICE PV_PE_COUNT PV_UUID FORMAT ATTR
SIZE FREE PE_SIZE VG_UUID/ ],
VOLUME_GROUPS => [ qw/VG_NAME PV_COUNT LV_COUNT ATTR SIZE FREE VG_UUID
VG_EXTENT_SIZE/ ],
LICENSEINFOS => [ qw/NAME FULLNAME KEY COMPONENTS TRIAL UPDATE OEM ACTIVATION_DATE PRODUCTID/ ]
);
use lib '/usr/share/fusioninventory/lib';
use FusionInventory::Agent::Inventory;
my $inventory = FusionInventory::Agent::Inventory->new();
my %fields;
while (my ($a, $b) = each(%{$inventory->{'fields'}})) {
$fields{$a} = [keys(%$b)]
}
my %fields2;
......@@ -111,8 +50,13 @@ while (my ($a, $b) = each(%fields)) {
print "##\n## inventory-fd.schema - Needed by Fusion Directory for managing inventories\n##\n";
print "\n# Attributes\n";
print "attributetype ( 1.3.6.1.4.1.38414.39.1.1 NAME 'fdInventoryVERSIONCLIENT'
DESC 'FusionDirectory - inventory, client version'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )\n\n";
my $i = 1;
my $i = 2;
for my $f (keys(%fields2)) {
print "attributetype ( 1.3.6.1.4.1.38414.39.1.$i NAME 'fdInventory$f'
......@@ -127,7 +71,7 @@ print "\n# Object classes\n";
print "objectclass ( 1.3.6.1.4.1.38414.39.2.1 NAME 'fdInventoryContent'
DESC 'FusionDirectory inventory information'
MUST ( cn )
MAY ( macAddress ) )\n\n";
MAY ( macAddress \$ ipHostNumber \$ fdInventoryVERSIONCLIENT ) )\n\n";
$i = 2;
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-LDAP2ZONE 1"
.TH ARGONAUT-LDAP2ZONE 1 "2015-07-27" "Argonaut 0.9.3" "Argonaut Documentation"
.TH ARGONAUT-LDAP2ZONE 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -72,8 +72,7 @@ sub write_warnquota_file {
print WARNQUOTA "LDAP_SEARCH_ATTRIBUTE = ".$settings->{'ldap_searchattribute'}."\n";
print WARNQUOTA "LDAP_MAIL_ATTRIBUTE = mail\n";
print WARNQUOTA "LDAP_BASEDN = ".$settings->{'ldap_basedn'}."\n";
print WARNQUOTA "LDAP_HOST = ".$settings->{'ldap_host'}."\n";
print WARNQUOTA "LDAP_PORT = ".$settings->{'ldap_port'}."\n";
print WARNQUOTA "LDAP_URI = ".$settings->{'ldap_uri'}."\n";
print WARNQUOTA "LDAP_USER_DN = ".$settings->{'ldap_userdn'}."\n";
print WARNQUOTA "LDAP_PASSWORD = ".$settings->{'ldap_userpwd'}."\n";
# end of warnquota.conf
......@@ -88,7 +87,7 @@ sub write_quotatab_file {
my @quotaDeviceParameters = @{$settings->{'device_parameters'}};
if ($#quotaDeviceParameters >= 0) {
foreach (@quotaDeviceParameters) {
my @quotaDeviceParameter = split /:/;
my @quotaDeviceParameter = split /:/, $_, -1;
print QUOTATAB $quotaDeviceParameter[0].":".$quotaDeviceParameter[2]."\n";
}
}
......@@ -101,16 +100,16 @@ sub get_quota_settings {
'quotaService',
{
'hostname' => 'cn',
'mail_cmd' => "quotaMailCommand",
'cc_to' => "quotaCarbonCopyMail",
'from' => "quotaMsgFromSupport",
'subject' => "quotaMsgSubjectSupport",
'support' => "quotaMsgContactSupport",
'message' => "quotaMsgContentSupport",
'signature' => "quotaMsgSignatureSupport",
'charset' => "quotaMsgCharsetSupport",
'ldap_searchattribute' => "quotaLdapSearchIdAttribute",
'ldap_userdn' => "quotaLdapServerUserDn",
'mail_cmd' => 'quotaMailCommand',
'cc_to' => 'quotaCarbonCopyMail',
'from' => 'quotaMsgFromSupport',
'subject' => 'quotaMsgSubjectSupport',
'support' => 'quotaMsgContactSupport',
'message' => 'quotaMsgContentSupport',
'signature' => 'quotaMsgSignatureSupport',
'charset' => 'quotaMsgCharsetSupport',
'ldap_searchattribute' => 'quotaLdapSearchIdAttribute',
'ldap_userdn' => 'quotaLdapServerUserDn',
'ldap_userpwd' => 'quotaLdapServerUserPassword',
'ldap_dn' => 'quotaLdapServer',
'device_parameters' => ['quotaDeviceParameters', asref => 1],
......@@ -129,10 +128,8 @@ sub get_quota_settings {
if ($mesg->count <= 0) {
die "Could not found LDAP server ".$settings->{'ldap_dn'}."\n";
}
my $uri = URI->new(($mesg->entries)[0]->get_value('goLdapURI'));
$settings->{'ldap_basedn'} = ($mesg->entries)[0]->get_value('goLdapBase');
$settings->{'ldap_host'} = $uri->host;
$settings->{'ldap_port'} = $uri->port;
$settings->{'ldap_uri'} = ($mesg->entries)[0]->get_value('goLdapURI');
return $settings;
}
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-QUOTA 1"
.TH ARGONAUT-QUOTA 1 "2015-04-22" "Argonaut 0.9.3" "Argonaut Documentation"
.TH ARGONAUT-QUOTA 1 "2015-12-07" "Argonaut 0.9.4" "Argonaut Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ARGONAUT-SERVER 1"
.TH ARGONAUT-SERVER 1 "2015-08-25" "Argonaut 0.9.3" "Argonaut Documentation"
.TH ARGONAUT-SERVER 1 "2015-12-07" "Argonaut 0.9.4" "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