From 830807c65821ae7dfbde2a40cea34c6c86e3f61e Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 26 Feb 2008 17:04:39 +0000 Subject: [PATCH] Use open generally with utf-8 support git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9133 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/client/events/corefunctions.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gosa-si/client/events/corefunctions.pm b/gosa-si/client/events/corefunctions.pm index 21822d2c3..074b04f52 100644 --- a/gosa-si/client/events/corefunctions.pm +++ b/gosa-si/client/events/corefunctions.pm @@ -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"; -- 2.30.2