Code

Use open generally with utf-8 support
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Feb 2008 17:04:39 +0000 (17:04 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Feb 2008 17:04:39 +0000 (17:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9133 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/client/events/corefunctions.pm

index 21822d2c3bccddf5cf0fd2d8fe58464950ff2af7..074b04f524248e0dccb6fcb5e1e3388c09bde03c 100644 (file)
@@ -19,6 +19,7 @@ use warnings;
 use Data::Dumper;
 use Fcntl;
 use utf8;
+use open ':utf8';
 use GOSA::GosaSupportDaemon;
 use File::Basename;
 
@@ -214,7 +215,7 @@ sub new_ldap_config {
     # Setup ldap.conf
     my $file1;
     my $file2;
-    open(file1, ">:utf8", "$ldap_config");
+    open(file1, "> $ldap_config");
     print file1 "# This file was automatically generated by gosa-si-client. Do not change.\n";
     print file1 "URI";
     foreach $element (@ldap_uris) {
@@ -228,8 +229,8 @@ sub new_ldap_config {
     daemon_log("wrote $ldap_config", 5);
 
     # Setup pam_ldap.conf / libnss_ldap.conf
-    open(file1, ">:utf8", "$pam_config");
-    open(file2, ">:utf8", "$nss_config");
+    open(file1, "> $pam_config");
+    open(file2, "> $nss_config");
     print file1 "# This file was automatically generated by gosa-si-client. Do not change.\n";
     print file2 "# This file was automatically generated by gosa-si-client. Do not change.\n";
     print file1 "uri";
@@ -253,11 +254,11 @@ sub new_ldap_config {
 
     # Create goto.secrets if told so - for compatibility reasons
     if (defined $goto_admin){
-           open(file1, ">:utf8", "/etc/goto/secret");
+           open(file1, "> /etc/goto/secret");
             close(file1);
             chown(0,0, "/etc/goto/secret");
             chmod(0600, "/etc/goto/secret");
-           open(file1, ">:utf8", "/etc/goto/secret");
+           open(file1, "> /etc/goto/secret");
             print file1 "GOTOADMIN=\"$goto_admin\"\nGOTOSECRET=\"$goto_secret\"\n";
             close(file1);
             daemon_log("wrote /etc/goto/secret", 5);
@@ -270,7 +271,7 @@ sub new_ldap_config {
     my $ldap_server= $ldap_uris[0];
     $ldap_server=~ s/^ldap:\/\/([^:]+).*$/$1/;
 
-    open(file1, ">:utf8", "$cfg_name");
+    open(file1, "> $cfg_name");
     print file1 "LDAP_BASE=\"$ldap_base\"\n";
     print file1 "LDAP_SERVER=\"$ldap_server\"\n";
     print file1 "ADMIN_BASE=\"$admin_base\"\n";