Alex Burger wrote:

[EMAIL PROTECTED] wrote:

Using a 5.2.pre2- win32 binary..
1. Un-install does not remove all of the files.
    These files remain:
/c/usr/share/snmp/mib2c.access_functions.conf
/c/usr/share/snmp/mib2c.array-user.conf
/c/usr/share/snmp/mib2c.check_values.conf
/c/usr/share/snmp/mib2c.check_values_local.conf
/c/usr/share/snmp/mib2c.column_defines.conf
/c/usr/share/snmp/mib2c.column_enums.conf
/c/usr/share/snmp/mib2c.conf
/c/usr/share/snmp/mib2c.create-dataset.conf
/c/usr/share/snmp/mib2c.int_watch.conf
/c/usr/share/snmp/mib2c.iterate.conf
/c/usr/share/snmp/mib2c.iterate_access.conf
/c/usr/share/snmp/mib2c.notify.conf
/c/usr/share/snmp/mib2c.old-api.conf
/c/usr/share/snmp/mib2c.scalar.conf
/c/usr/share/snmp/mibs/SNMP-USM-AES-MIB.txt


The net-snmp.nsi script does not have any of the mib2c.* files, so I suspect you installed on top of a folder that already contained the files.

The attached patch includes all the missing files including the mib2c files, some MIB files and a header file. I did a compare between the compiled folder and the installed folder and added all missing files. I will add this final check to the build docs as I am sure it will happen often as files are added and removed over time.

Great!


NOTE: These files also remain.  As we had discussed,
these files are OK to remain.
/c/usr/etc/snmp/snmp.conf
/c/usr/etc/snmp/snmpd.conf
/c/usr/log/snmpd.log



2. Un-install does not remove service information from registry

   CHECK = Invoke REGEDIT and search from the top for snmpd.log

   Install then CHECK . should not see snmpd.log

   Register agent service then CHECK.  should see snmpd.log

   Un-install then CHECK. should not see snmpd.log

These statements I believe should hold true
 When user invokes Register service, that action should always succeed
 When user invokes Unregister service, that action should always succeed


I added in the EXEC statement to unregister the agent and trapd service before deleting the files and I added a registry check first so it does not try to unregister if it is not registered. This is only to eliminate an extra event log entry saying the service can't be found...

3. If I install, register service, un-install,
   then install, attempt to register service will fail,
   with indication that the service is already registered
      "Can't create service Net-SNMP Agent.
       The specified service already exists.
      "
   I must manually unregister the service, in this case.


Should be fixed with the patch.

    I believe that the correct fix is to
    invoke the unregister service function when this occurs,
    and then retry the register service function one more time.

    I think something like the change I've described
       should be made in winservice.c.


So the -register feature should be changed so that it also acts as a 're-register'. That sounds like a good idea.

    I don't trust return codes in .BAT files.
     They have been proven unreliable.

What do you think of this ?


Please try out the patch and let me know if there are any issues with it. If it is fine, then I will commit it to 5.2 and modify it for V5-1-Patches.

Alex


------------------------------------------------------------------------

--- win32/dist/installer/net-snmp.nsi.org 2004-10-01 11:30:51.000000000 -0400
+++ win32/dist/installer/net-snmp.nsi 2004-10-02 23:32:53.000000000 -0400
@@ -3,9 +3,9 @@
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Net-SNMP"
!define PRODUCT_MAJ_VERSION "5"
-!define PRODUCT_MIN_VERSION "1"
-!define PRODUCT_REVISION "2"
-!define PRODUCT_EXE_VERSION "pre1"
+!define PRODUCT_MIN_VERSION "2"
+!define PRODUCT_REVISION "0"
+!define PRODUCT_EXE_VERSION "1"
!define PRODUCT_WEB_SITE "http://www.net-snmp.com";
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\encode_keychange.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
@@ -106,8 +106,12 @@
SetOutPath "$INSTDIR\share\snmp\mibs"
File "share\snmp\mibs\AGENTX-MIB.txt"
File "share\snmp\mibs\DISMAN-EVENT-MIB.txt"
+ File "share\snmp\mibs\DISMAN-EXPRESSION-MIB.txt"
+ File "share\snmp\mibs\DISMAN-NSLOOKUP-MIB.txt"
+ File "share\snmp\mibs\DISMAN-PING-MIB.txt"
File "share\snmp\mibs\DISMAN-SCHEDULE-MIB.txt"
File "share\snmp\mibs\DISMAN-SCRIPT-MIB.txt"
+ File "share\snmp\mibs\DISMAN-TRACEROUTE-MIB.txt"
File "share\snmp\mibs\EtherLike-MIB.txt"
File "share\snmp\mibs\HCNUM-TC.txt"
File "share\snmp\mibs\HOST-RESOURCES-MIB.txt"
@@ -129,6 +133,7 @@
File "share\snmp\mibs\MTA-MIB.txt"
File "share\snmp\mibs\NET-SNMP-AGENT-MIB.txt"
File "share\snmp\mibs\NET-SNMP-EXAMPLES-MIB.txt"
+ File "share\snmp\mibs\NET-SNMP-EXTEND-MIB.txt"
File "share\snmp\mibs\NET-SNMP-MIB.txt"
File "share\snmp\mibs\NET-SNMP-MONITOR-MIB.txt"
File "share\snmp\mibs\NET-SNMP-SYSTEM-MIB.txt"
@@ -147,6 +152,8 @@
File "share\snmp\mibs\SNMP-PROXY-MIB.txt"
File "share\snmp\mibs\SNMP-TARGET-MIB.txt"
File "share\snmp\mibs\SNMP-USER-BASED-SM-MIB.txt"
+ File "share\snmp\mibs\SNMP-USM-AES-MIB.txt"
+ File "share\snmp\mibs\SNMP-USM-DH-OBJECTS-MIB.txt"
File "share\snmp\mibs\SNMPv2-CONF.txt"
File "share\snmp\mibs\SNMPv2-MIB.txt"
File "share\snmp\mibs\SNMPv2-SMI.txt"
@@ -154,6 +161,7 @@
File "share\snmp\mibs\SNMPv2-TM.txt"
File "share\snmp\mibs\SNMP-VIEW-BASED-ACM-MIB.txt"
File "share\snmp\mibs\TCP-MIB.txt"
+ File "share\snmp\mibs\TRANSPORT-ADDRESS-MIB.txt"
File "share\snmp\mibs\TUNNEL-MIB.txt"
File "share\snmp\mibs\UCD-DEMO-MIB.txt"
File "share\snmp\mibs\UCD-DISKIO-MIB.txt"
@@ -163,6 +171,27 @@
File "share\snmp\mibs\UCD-SNMP-MIB.txt"
File "share\snmp\mibs\UCD-SNMP-MIB-OLD.txt"
File "share\snmp\mibs\UDP-MIB.txt"
+ SetOutPath "$INSTDIR\share\snmp"
+ File "share\snmp\mib2c.access_functions.conf"
+ File "share\snmp\mib2c.array-user.conf"
+ File "share\snmp\mib2c.check_values.conf"
+ File "share\snmp\mib2c.check_values_local.conf"
+ File "share\snmp\mib2c.column_defines.conf"
+ File "share\snmp\mib2c.column_enums.conf"
+ File "share\snmp\mib2c.column_storage.conf"
+ File "share\snmp\mib2c.conf"
+ File "share\snmp\mib2c.container.conf"
+ File "share\snmp\mib2c.create-dataset.conf"
+ File "share\snmp\mib2c.genhtml.conf"
+ File "share\snmp\mib2c.int_watch.conf"
+ File "share\snmp\mib2c.iterate.conf"
+ File "share\snmp\mib2c.iterate_access.conf"
+ File "share\snmp\mib2c.iterate2.conf"
+ File "share\snmp\mib2c.mfd.conf"
+ File "share\snmp\mib2c.notify.conf"
+ File "share\snmp\mib2c.old-api.conf"
+ File "share\snmp\mib2c.scalar.conf"
+ File "share\snmp\mib2c.table_data.conf"
SetOutPath "$INSTDIR\docs"
File "docs\COPYING"
File "docs\Net-SNMP.chm"
@@ -177,6 +206,7 @@
SetOutPath "$INSTDIR\include\net-snmp"
File "include\net-snmp\net-snmp-config.h"
SetOutPath "$INSTDIR\include\net-snmp\agent"
+ File "include\net-snmp\agent\agent_module_config.h"
File "include\net-snmp\agent\mib_module_config.h"
CreateDirectory "$INSTDIR\temp"
CreateDirectory "$INSTDIR\snmp"
@@ -540,6 +570,17 @@
Section Uninstall
ReadRegStr $ICONS_GROUP ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "${PRODUCT_STARTMENU_REGVAL}"
+
+ ReadRegStr $1 "HKLM" "SYSTEM\CurrentControlSet\Services\Net-SNMP Agent" "DisplayName"
+ IfErrors SkipAgentUninstall
+ ExecWait "$\"$INSTDIR\bin\snmpd.exe$\" -unregister -quiet 2>nul$\r$\n"
+ SkipAgentUninstall:
+
+ ReadRegStr $1 "HKLM" "SYSTEM\CurrentControlSet\Services\Net-SNMP Trap Handler" "DisplayName"
+ IfErrors SkipTrapDUninstall
+ ExecWait "$\"$INSTDIR\bin\snmptrapd.exe$\" -unregister -quiet 2>nul$\r$\n" + SkipTrapDUninstall:
+
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\README.txt"
Delete "$INSTDIR\registeragent.bat"
@@ -549,6 +590,7 @@
Delete "$INSTDIR\perl\Net-SNMP.ppd"
Delete "$INSTDIR\perl\x86\Net-SNMP.tar.gz"
Delete "$INSTDIR\include\net-snmp\net-snmp-config.h"
+ Delete "$INSTDIR\include\net-snmp\agent\agent_module_config.h"
Delete "$INSTDIR\include\net-snmp\agent\mib_module_config.h"
Delete "$INSTDIR\docs\COPYING"
Delete "$INSTDIR\docs\Net-SNMP.chm"
@@ -599,11 +641,14 @@
Delete "$INSTDIR\share\snmp\snmpconf-data\snmptrapd-data\authentication"
Delete "$INSTDIR\share\snmp\snmpconf-data\snmptrapd-data\logging"
Delete "$INSTDIR\share\snmp\snmpconf-data\snmptrapd-data\runtime"
- ;Delete "$INSTDIR\share\snmp\snmp.conf"
Delete "$INSTDIR\share\snmp\mibs\AGENTX-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\DISMAN-EVENT-MIB.txt"
+ Delete "$INSTDIR\share\snmp\mibs\DISMAN-EXPRESSION-MIB.txt"
+ Delete "$INSTDIR\share\snmp\mibs\DISMAN-NSLOOKUP-MIB.txt"
+ Delete "$INSTDIR\share\snmp\mibs\DISMAN-PING-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\DISMAN-SCHEDULE-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\DISMAN-SCRIPT-MIB.txt"
+ Delete "$INSTDIR\share\snmp\mibs\DISMAN-TRACEROUTE-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\EtherLike-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\HCNUM-TC.txt"
Delete "$INSTDIR\share\snmp\mibs\HOST-RESOURCES-MIB.txt"
@@ -625,6 +670,7 @@
Delete "$INSTDIR\share\snmp\mibs\MTA-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\NET-SNMP-AGENT-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\NET-SNMP-EXAMPLES-MIB.txt"
+ Delete "$INSTDIR\share\snmp\mibs\NET-SNMP-EXTEND-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\NET-SNMP-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\NET-SNMP-MONITOR-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\NET-SNMP-SYSTEM-MIB.txt"
@@ -643,6 +689,8 @@
Delete "$INSTDIR\share\snmp\mibs\SNMP-PROXY-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\SNMP-TARGET-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\SNMP-USER-BASED-SM-MIB.txt"
+ Delete "$INSTDIR\share\snmp\mibs\SNMP-USM-AES-MIB.txt"
+ Delete "$INSTDIR\share\snmp\mibs\SNMP-USM-DH-OBJECTS-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\SNMPv2-CONF.txt"
Delete "$INSTDIR\share\snmp\mibs\SNMPv2-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\SNMPv2-SMI.txt"
@@ -650,6 +698,7 @@
Delete "$INSTDIR\share\snmp\mibs\SNMPv2-TM.txt"
Delete "$INSTDIR\share\snmp\mibs\SNMP-VIEW-BASED-ACM-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\TCP-MIB.txt"
+ Delete "$INSTDIR\share\snmp\mibs\TRANSPORT-ADDRESS-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\TUNNEL-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\UCD-DEMO-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\UCD-DISKIO-MIB.txt"
@@ -660,8 +709,27 @@
Delete "$INSTDIR\share\snmp\mibs\UCD-SNMP-MIB-OLD.txt"
Delete "$INSTDIR\share\snmp\mibs\UDP-MIB.txt"
Delete "$INSTDIR\share\snmp\mibs\.index"
- ;Delete "$INSTDIR\share\snmp\snmpd.conf"
- ;Delete "$INSTDIR\etc\snmp\snmp.conf"
+ SetOutPath "$INSTDIR\share\snmp"
+ Delete "$INSTDIR\share\snmp\mib2c.access_functions.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.array-user.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.check_values.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.check_values_local.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.column_defines.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.column_enums.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.column_storage.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.container.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.create-dataset.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.genhtml.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.int_watch.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.iterate.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.iterate_access.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.iterate2.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.mfd.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.notify.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.old-api.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.scalar.conf"
+ Delete "$INSTDIR\share\snmp\mib2c.table_data.conf"
Delete "$SMPROGRAMS\$ICONS_GROUP\Net-SNMP Help.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\README.lnk"

-- -------------------------- Andy Smith, MCP [EMAIL PROTECTED] --------------------------



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to