
Property changes on: conf
___________________________________________________________________
Name: svn:ignore
   - cupsd.conf
mime.convs
pam.std

   + cupsd.conf
mime.convs
pam.std
snmp.conf


Index: conf/snmp.conf.in
===================================================================
--- conf/snmp.conf.in	(revision 0)
+++ conf/snmp.conf.in	(revision 0)
@@ -0,0 +1,13 @@
+#
+# "$Id$"
+#
+#   Sample SNMP configuration file for CUPS.  See "man smnp.conf" for a
+#   complete description of this file.
+#
+
+@CUPS_SNMP_ADDRESS@
+@CUPS_SNMP_COMMUNITY@
+
+#
+# End of "$Id$".
+#

Property changes on: conf/snmp.conf.in
___________________________________________________________________
Name: svn:eol-style
   + native

Index: conf/Makefile
===================================================================
--- conf/Makefile	(revision 6606)
+++ conf/Makefile	(working copy)
@@ -28,7 +28,7 @@
 # Config files...
 #
 
-KEEP	=	cupsd.conf
+KEEP	=	cupsd.conf snmp.conf
 REPLACE	=	mime.convs mime.types
 
 
Index: backend/snmp.c
===================================================================
--- backend/snmp.c	(revision 6606)
+++ backend/snmp.c	(working copy)
@@ -1826,8 +1826,14 @@
 
   if (cupsArrayCount(Addresses) == 0)
   {
-    fputs("INFO: Using default SNMP Address @LOCAL\n", stderr);
-    add_array(Addresses, "@LOCAL");
+   /*
+    * If we have no addresses, exit immediately...
+    */
+
+    fprintf(stderr,
+            "DEBUG: No address specified and no Address line in %s...\n",
+	    filename);
+    exit(0);
   }
 
   if (cupsArrayCount(Communities) == 0)
Index: config-scripts/cups-defaults.m4
===================================================================
--- config-scripts/cups-defaults.m4	(revision 6606)
+++ config-scripts/cups-defaults.m4	(working copy)
@@ -309,6 +309,26 @@
 fi
 AC_SUBST(DEFAULT_RAW_PRINTING)
 
+dnl Default SNMP options...
+AC_ARG_WITH(snmp-address, [  --with-snmp-address     set SNMP query address, default=auto ],
+	if test "x$withval" = x; then
+		CUPS_SNMP_ADDRESS=""
+	else
+		CUPS_SNMP_ADDRESS="Address $withval"
+	fi,
+	if test "x$uname" = xDarwin; then
+		CUPS_SNMP_ADDRESS=""
+	else
+		CUPS_SNMP_ADDRESS="Address @LOCAL"
+	fi)
+
+AC_ARG_WITH(snmp-community, [  --with-snmp-community   set SNMP community, default=public ],
+	CUPS_SNMP_COMMUNITY="Community $withval",
+	CUPS_SNMP_COMMUNITY="Community public")
+
+AC_SUBST(CUPS_SNMP_ADDRESS)
+AC_SUBST(CUPS_SNMP_COMMUNITY)
+
 dnl
 dnl End of "$Id$".
 dnl
Index: configure.in
===================================================================
--- configure.in	(revision 6606)
+++ configure.in	(working copy)
@@ -76,8 +76,8 @@
 AC_SUBST(UNINSTALL_LANGUAGES)
 
 AC_OUTPUT(Makedefs packaging/cups.list init/cups.sh init/cups-lpd cups-config
-	  conf/cupsd.conf conf/mime.convs conf/pam.std doc/index.html
-	  doc/help/ref-cupsd-conf.html doc/help/standard.html
+	  conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf
+	  doc/index.html doc/help/ref-cupsd-conf.html doc/help/standard.html
 	  man/client.conf.man man/cups-deviced.man man/cups-driverd.man
 	  man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
 	  man/cupsd.conf.man man/lpoptions.man
Index: CHANGES.txt
===================================================================
--- CHANGES.txt	(revision 6610)
+++ CHANGES.txt	(working copy)
@@ -5,6 +5,9 @@
 
 	- Documentation updates (STR #1775, STR #2130, STR #2131,
 	  STR #2263, STR #2356, STR #2397)
+	- The SNMP backend no longer adds a default Address line
+	  when none is specified in the snmp.conf file; this allows
+	  the backend to be easily disabled as needed (STR #2434)
 	- Added a new cupsctl command for doing basic changes to
 	  the cupsd.conf file (STR #1777)
 	- Added a new ppdLocalizeIPPReason() function to get the
