#pragma implementation #include #include #include #include #include "suse.h" #include "suse.m" #include MODULE_DEFINE_VERSION(suse); #if 0 static HELP_FILE help_intro (HELP_SUSE,"intro"); #endif PUBLIC MODULE_suse::MODULE_suse() : LINUXCONF_MODULE("suse") { linuxconf_loadmsg ("suse",PACKAGE_REV); // This install an override (a filter in fact) for /etc/conf.linuxconf // management. Mostly, it allows the filter to intercept some updates // and direct the information in the proper SuSE config files linuxconf_sethook (filter_fctnew); // This installs a hook to manage the routing groutes_sethook (routes_load,routes_save); // ipalias_sethook (NULL,ipalias_save); #if 0 // Same things for IP aliases ipalias_sethook (devinfo_ipalias_load,devinfo_ipalias_save); #endif #if 0 // This installs a hook to manage the "basic host information" // and "IPX configuration" data. This is the functions who // will store the information in SuSE format hostinfo_sethook (devinfo_load,devinfo_save); #endif #if 0 // If the SuSE distribution is adapted to support enhanced sysv // init script, then this hooks will let linuxconf control // service activity by managing sysv init script. netconf_setservhook (sysv_getserv,sysv_setserv); #endif if (suse_release() >= 604){ #if defined(__GLIBC__) && defined(HAS_PAM) #if 0 // This install a hook to manage user account using // useradd and friends. users_sethook (reduser_del,reduser_add,reduser_change); // This enable PAM for password management passwd_sethook (pam_check_pass,pam_change_pass,pam_check_pair); #endif #endif } } PUBLIC int MODULE_suse::dohtml (const char *key) { int ret = LNCF_NOT_APPLICABLE; if (strcmp(key,"suse")==0){ // ### Insert any menu and dialog here ret = 0; } return ret; } static void usage() { xconf_error (MSG_U(T_USAGE ,"Module suse\n" "linuxconf --modulemain suse [ specific options ]\n" "\n") ); } PUBLIC int MODULE_suse::execmain (int argc , char *argv[], bool) { int ret = LNCF_NOT_APPLICABLE; const char *pt = strrchr(argv[0],'/'); if (pt != NULL){ pt++; }else{ pt = argv[0]; } if (strcmp(pt,"suse")==0){ ret = -1; if (argc == 1){ // ### Place call to main menu of the module }else{ // ### Add some option parsing for the module ::usage(); } } return ret; } static MODULE_suse suse;