Add crontab entry

pull/1/head
Timothy Pearson 13 years ago
parent bb72c681df
commit 074b7ac197

@ -59,6 +59,7 @@
#define PAMD_DIRECTORY "/etc/pam.d/" #define PAMD_DIRECTORY "/etc/pam.d/"
#define PAMD_COMMON_ACCOUNT "common-account" #define PAMD_COMMON_ACCOUNT "common-account"
#define PAMD_COMMON_AUTH "common-auth" #define PAMD_COMMON_AUTH "common-auth"
#define CRON_UPDATE_NSS_FILE "/etc/cron.daily/upd-local-nss-db"
#define DEFAULT_IGNORED_USERS_LIST "avahi,avahi-autoipd,backup,bin,colord,daemon,games,gnats,haldaemon,hplip,irc,klog,landscape,libuuid,list,lp,mail,man,messagebus,news,ntp,polkituser,postfix,proxy,pulse,root,rtkit,saned,sshd,statd,sync,sys,syslog,timidity,usbmux,uucp,www-data" #define DEFAULT_IGNORED_USERS_LIST "avahi,avahi-autoipd,backup,bin,colord,daemon,games,gnats,haldaemon,hplip,irc,klog,landscape,libuuid,list,lp,mail,man,messagebus,news,ntp,polkituser,postfix,proxy,pulse,root,rtkit,saned,sshd,statd,sync,sys,syslog,timidity,usbmux,uucp,www-data"
typedef KGenericFactory<LDAPConfig, TQWidget> ldapFactory; typedef KGenericFactory<LDAPConfig, TQWidget> ldapFactory;
@ -345,6 +346,8 @@ void LDAPConfig::save() {
writeNSSwitchFile(); writeNSSwitchFile();
// Write the PAM configuration files // Write the PAM configuration files
writePAMFiles(); writePAMFiles();
// Write the cron files
writeCronFiles();
} }
load(); load();
@ -742,6 +745,21 @@ void LDAPConfig::writePAMFiles() {
} }
} }
void LDAPConfig::writeCronFiles() {
TQFile file(CRON_UPDATE_NSS_FILE);
if (file.open(IO_WriteOnly)) {
TQTextStream stream( &file );
stream << "# This file was automatically generated by TDE\n";
stream << "# All changes will be lost!\n";
stream << "\n";
stream << "#!/bin/sh" << "\n";
stream << "/usr/sbin/nss_updatedb ldap" << "\n";
file.close();
}
}
int LDAPConfig::buttons() { int LDAPConfig::buttons() {
return KCModule::Apply|KCModule::Help; return KCModule::Apply|KCModule::Help;
} }

@ -95,6 +95,7 @@ class LDAPConfig: public KCModule
void writeLDAPConfFile(); void writeLDAPConfFile();
void writeNSSwitchFile(); void writeNSSwitchFile();
void writePAMFiles(); void writePAMFiles();
void writeCronFiles();
private: private:
KAboutData *myAboutData; KAboutData *myAboutData;

Loading…
Cancel
Save