Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > e59d839f9681da7681d4908c06f8ecf5 > files > 4

perl-kolab-5.8.7-8mdv2009.0.src.rpm

--- Kolab/Kolab.pm.in	2007-03-28 03:48:28.000000000 +0200
+++ Kolab/Kolab.pm.in.oden	2007-05-19 17:00:26.000000000 +0200
@@ -112,30 +112,6 @@
 	$error = 1;
     }
 
-    $config{'kolab_n_uid'} = (getpwnam('@kolab_usr@'))[2];
-    if (!defined $config{'kolab_n_uid'}) {
-        &log('C', "Unable to determine the uid of user '@kolab_usr@'", KOLAB_ERROR);
-	$error = 1;
-    }
-
-    $config{'kolab_n_gid'} = (getgrnam('@kolab_grp@'))[2];
-    if (!defined $config{'kolab_n_gid'}) {
-        &log('C', "Unable to determine the gid of user @kolab_grp@'", KOLAB_ERROR);
-	$error = 1;
-    }
-
-    $config{'kolab_r_uid'} = (getpwnam('@kolab_rusr@'))[2];
-    if (!defined $config{'kolab_r_uid'}) {
-        &log('C', "Unable to determine the uid of user '@kolab_rusr@'", KOLAB_ERROR);
-	$error = 1;
-    }
-
-    $config{'kolab_r_gid'} = (getgrnam('@kolab_rgrp@'))[2];
-    if (!defined $config{'kolab_r_gid'}) {
-        &log('C', "Unable to determine the gid of user '@kolab_rgrp@'", KOLAB_ERROR);
-	$error = 1;
-    }
-
     # Make sure the critical variables we need were defined in kolab.conf
     if (!exists $config{'bind_dn'} || !exists $config{'bind_pw'} || !exists $config{'ldap_uri'} || !exists $config{'base_dn'}) {
         &log('C', "One or more required configuration variables (`bind_dn', `bind_pw', `ldap_uri' and/or `base_dn') are missing in `kolab.conf'", KOLAB_ERROR);
@@ -399,50 +375,50 @@
 {
     if ($haschanged{'slapd'}) {
         &log('K', 'Restarting OpenLDAP...');
-        system("@KOLABRC@ rc openldap restart &");
+        system("/etc/rc.d/init.d/ldap restart &");
     }
 
     if ($haschanged{'saslauthd'}) {
         &log('K', 'Restarting SASLAuthd...');
-        system("@KOLABRC@ rc sasl stop; sleep 1; @sbindir@/saslauthd -a ldap -n 5");
+        system("/etc/rc.d/init.d/saslauthd stop; sleep 1; @sbindir@/saslauthd -a ldap -n 5");
     }
 
     if ($haschanged{'apache'}) {
         &log('K', 'Reloading Apache...');
-        system("@sbindir@/apachectl graceful");
+        system("/etc/rc.d/init.d/httpd graceful");
     }
 
     if ($haschanged{'postfix'}) {
         &log('K', 'Reloading Postfix...');
-        system("@sbindir@/postfix reload");
+        system("/etc/rc.d/init.d/postfix reload");
     }
 
     if ($haschanged{'imapd'}) {
         &log('K', 'Restarting imapd...');
 	# Would it be enough with a reload here? /steffen
-        system("@KOLABRC@ rc imapd restart");
+        system("/etc/rc.d/init.d/cyrus-imapd restart");
     }
 
     if ($haschanged{'amavisd'}) {
         &log('K', 'Restarting amavisd...');
-        system("@KOLABRC@ rc amavisd restart");
+        system("/etc/rc.d/init.d/amavisd restart");
     }
 
     if ($haschanged{'clamav'}) {
         &log('K', 'Restarting clamav...');
-        system("@KOLABRC@ rc clamav restart");
+        system("/etc/rc.d/init.d/clamd restart");
     }
 
     if ($config{'proftpd-ftp'} =~ /true/i) {
         Kolab::log('K', 'Starting ProFTPd if not running');
-        system("@KOLABRC@ rc proftpd start");
+        system("/etc/rc.d/init.d/proftpd start");
         if ($haschanged{'proftpd'}) {
             &log('K', 'Reloading ProFTPd...');
             kill('SIGHUP', `cat @ftpserver_pidfile@`);
         }
     } else {
         &log('K', 'Stopping ProFTPd, if running...');
-        system("@KOLABRC@ rc proftpd stop");
+        system("/etc/rc.d/init.d/proftpd stop");
     }
 
     %Kolab::Conf::haschanged = ();