Changes

From SME Server
Jump to navigationJump to search
Line 90: Line 90:  
====Zugriff über die Perl API====
 
====Zugriff über die Perl API====
   −
Sie können auch mit Perl-Programmen auf die Konfigurations-Datenbanken zugreifen, wenn Sie ''esmith::ConfigDB'' und zugehörige Perl Module verwenden, which are abstractions for the esmith::DB module.
+
Sie können auch mit Perl-Programmen auf die Konfigurations-Datenbanken zugreifen, wenn Sie ''esmith::ConfigDB'' und zugehörige Perl Module verwenden, die Abstraktionen für die ''esmith::DB module'' sind.
   −
For example, we can retrieve and show the admin account details like this:
+
Zum Beispiel können Sie Details zum Benutzerkonto ''admin'' folgendermaßen anfordern und anzeigen lassen:
 +
use esmith::AccountsDB;
 +
my $db = esmith::AccountsDB->open or die "Couldn't open AccountsDB\n";
 +
my $admin = $db->get("admin") or die "admin account missing from AccountsDB\n";
 +
print $admin->show();
   −
use esmith::AccountsDB;
+
Mit diesem Code-Fragment würden die gleichen Informationen angezeigt wie mit dem Befehl
 
+
''db accounts show admin'' aus dem vorigen Abschnitt.
my $db = esmith::AccountsDB->open or die "Couldn't open AccountsDB\n";
+
admin
 
  −
my $admin = $db->get("admin") or die "admin account missing from AccountsDB\n";
  −
 
  −
print $admin->show();
  −
 
  −
This code fragment would display the same information as running the db accounts show admin command we saw previously.
  −
 
  −
admin
   
     EmailForward = local
 
     EmailForward = local
 
         FirstName = Local
 
         FirstName = Local
Line 116: Line 112:  
             type = system
 
             type = system
   −
The Perl API will be covered in more depth in the exercises later in this manual. For documentation on the API, log into the SME Server and browse the documentation using the perldoc command:
+
Die Perl API wird noch deutlich tiefer in den späteren Übungen dieses Handbuchs beschrieben. Die Dokumentation dieser API finden Sie über die SME Server Shell mit dem ''perldoc''-Befehl:
 
+
perldoc esmith::ConfigDB
perldoc esmith::ConfigDB
+
perldoc esmith::AccountsDB
perldoc esmith::AccountsDB
+
perldoc esmith::HostsDB
perldoc esmith::HostsDB
+
perldoc esmith::NetworksDB
perldoc esmith::NetworksDB
+
perldoc esmith::DB
 
  −
perldoc esmith::DB
     −
Database initialization
+
====Database Initialisierung====
    
The configuration databases are initialized from files in the /etc/e-smith/db/ hierarchy. These files can perform one of three actions:
 
The configuration databases are initialized from files in the /etc/e-smith/db/ hierarchy. These files can perform one of three actions:
1,346

edits

Navigation menu