From: <no...@so...> - 2002-03-21 15:33:59
|
Patches item #480729, was opened at 2001-11-11 15:18 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=312694&aid=480729&group_id=12694 Category: None Group: None >Status: Closed >Resolution: Fixed >Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: run net-snmpd as service under win32 Initial Comment: Hi, with this patch it's possible to install net-snmpd as service under win32 (NT/2000). Add the file service.c to the snmpd-Workspace and change the main() in snmpd.c into the following: #ifdef WIN32 int snmpd_main(int argc, char *argv[]) #else int main(int argc, char *argv[]) #endif After compilation its possible to install net-snmpd with snmpd /install as service. To uninstall use snmpd /uninstall. If snmpd is called from the console or WindowsExplorer it views a brief explanation what is going on and how this program should be called (from service manager). ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-11-15 11:13 Message: Logged In: NO If we want options to pass to a service, we need registry- keys for each option we want to set and my service-handler has to read them and set them as argv's. And we need a nice program in the Systemfolder which is able to write the registry-keys. Maybe conf-options are read from snmpd.conf? The second option, to add a cmdline -s or --no-service or thelike is only a small addition to service.c ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-11-14 07:08 Message: Logged In: NO With this patch, we can't set other options like running snmpd on some other port rather than default port(-p option) Can this be modified to include the options? ---------------------------------------------------------------------- Comment By: John Naylon (jbpn) Date: 2001-11-13 01:57 Message: Logged In: YES user_id=93926 This is really cool functionality, but I don't like the idea of making it impossible to run the daemon from the console -- this is useful when testing configurations, for example. What about looking at argv[0] or something, and doing the service initialisation iff it is == "snmpd-svc" or something like that? Or a command-line option? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=312694&aid=480729&group_id=12694 |