Index: pykota/trunk/conf/pykota.conf.sample
===================================================================
--- pykota/trunk/conf/pykota.conf.sample (revision 1475)
+++ pykota/trunk/conf/pykota.conf.sample (revision 1483)
@@ -187,4 +187,70 @@
 #                 default in PyKota since its beginning.
 #
+#                 In the lines below "%(printer)s" is automatically replaced
+#                 at run time with your printer's Fully Qualified Domain Name
+#                 for network printers.
+#                 e.g. myprinter.example.com
+#
+#         Example : 
+#         
+#             accounter: hardware(/usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
+#         
+#         Another untested example, using npadmin :
+#         
+#             accounter: hardware(/usr/bin/npadmin --pagecount %(printer)s)
+#         
+#         Another example, for AppleTalk printers which works fine :
+#         (You may need the pap CUPS backend installed, and copy the 
+#         pagecount.ps file from untested/netatalk into /etc or any 
+#         appropriate location)
+#         
+#             accounter: hardware(/usr/share/pykota/papwaitprinter.sh "MyPrinter:LaserWriter@*" && /usr/bin/pap -p "MyPrinter:LaserWriter@*" /usr/share/pykota/pagecount.ps  2>/dev/null | /bin/grep -v status | /bin/grep -v Connect | /usr/bin/tail -1)
+#         
+#         An example for parallel printers like the HP Laserjet 5MP :
+#         
+#             accounter: hardware(/bin/cat /usr/share/pykota/pagecount.pjl >/dev/lp0 && /usr/bin/head -2 </dev/lp0 | /usr/bin/tail -1)
+#         
+#         This value can be set either globally or per printer or both.
+#         If both are defined, the printer option has priority.
+#         
+#         Some examples and comments provided by Bob Martel from csuohio.edu
+#         
+#         For several printers I could not get the page count using snmpget.  I
+#         resorted to snmpwalk:
+#         
+#             accounter: hardware(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public %(printer)s | grep mib-2.43.10.2.1.4.1.1 | cut -d " " -f4)
+#         
+#         The last example is still more ugly, some of the printers only provided
+#         their counters without names, but at least always on the same line:
+#         
+#             accounter: hardware(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public -Ov %(printer)s | grep Counter32 | tail -2 | head -1 | cut -d " " -f2)
+#         
+#         An example using netcat and a preformatted PJL job which you can find
+#         in the untested/pjl directory, which is sent to a JetDirect print
+#         server on port 9100 :
+#         
+#             accounter: hardware(/bin/nc -w 2 %(printer)s 9100 </usr/share/pykota/pagecount.pjl | /usr/bin/tail -2)
+#         
+#         An example using the contributed pagecount.pl script which does 
+#         the same as above, but should work on more printers : 
+#         
+#             accounter: hardware(/usr/share/pykota/pagecount.pl %(printer)s 9100)
+#         
+#         WARNING : In any case, when using an hardware accounter, please test the command line outside
+#                   of PyKota before. This will save you some headaches in case it doesn't work as expected.
+#         
+#         The waitprinter.sh is there to wait until the printer is idle again.
+#         This should prevent a job to be sent to the printer while another one is 
+#         not yet finished (not all pages are printed, but the complete job is in 
+#         the printer)
+#         
+#         YOU ABSOLUTELY HAVE TO BE SURE YOU HAVE A SCRIPT WHICH WAITS FOR THE
+#         PRINTER BEING READY BEFORE ASKING FOR ITS INTERNAL PAGE COUNTER.
+#         
+#         PYKOTA INCLUDES SUCH SCRIPTS FOR SNMP AND APPLETALK PRINTERS, MORE TO COME
+#
+#         SOME OF THE ABOVE EXAMPLES DON'T USE SUCH A SCRIPT, YOU HAVE BEEN WARNED
+#         
+#
 #    - software : delegates the job's size computation to any 
 #                 external command of your choice. 
@@ -209,8 +275,7 @@
 # This value can be set either globally or on a per printer basis
 # If both are defined, the printer option has priority.
-# if not set it defaults to 'hardware'.
-#
-# default value 
-accounter: hardware
+#
+# default value
+accounter: hardware(/usr/share/pykota/waitprinter.sh %(printer)s && /usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
 # accounter: software(/usr/bin/pkpgcounter)
 
@@ -317,76 +382,4 @@
 [hpmarketing]
 
-# How to query the hpmarketing printer for its page counter.
-# THIS IS ONLY USED IF YOU HAVE SET 'accounter' TO 'hardware'
-# JUST COMMENT IT OUT IF YOU USE ANY OTHER ACCOUNTING METHOD.
-# (it would be ignored anyway)
-#
-# In the lines below "%(printer)s" is automatically replaced
-# at run time with your printer's Fully Qualified Domain Name
-# for network printers.
-# e.g. myprinter.example.com
-#
-# Only value supported is : external(... your command here...) 
-#
-# Example : 
-#
-#     requester: external(/usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
-#
-# Another untested example, using npadmin :
-#
-#     requester: external(/usr/bin/npadmin --pagecount %(printer)s)
-#
-# Another example, for AppleTalk printers which works fine :
-# (You may need the pap CUPS backend installed, and copy the 
-# pagecount.ps file from untested/netatalk into /etc or any 
-# appropriate location)
-#
-#     requester: external(/usr/share/pykota/papwaitprinter.sh "MyPrinter:LaserWriter@*" && /usr/bin/pap -p "MyPrinter:LaserWriter@*" /usr/share/pykota/pagecount.ps  2>/dev/null | /bin/grep -v status | /bin/grep -v Connect | /usr/bin/tail -1)
-#
-# An example for parallel printers like the HP Laserjet 5MP :
-#
-#     requester: external(/bin/cat /usr/share/pykota/pagecount.pjl >/dev/lp0 && /usr/bin/head -2 </dev/lp0 | /usr/bin/tail -1)
-# 
-# This value can be set either globally or per printer or both.
-# If both are defined, the printer option has priority.
-#
-# Some examples and comments provided by Bob Martel from csuohio.edu
-#
-# For several printers I could not get the page count using snmpget.  I
-# resorted to snmpwalk:
-# 
-# requester: external(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public %(printer)s | grep mib-2.43.10.2.1.4.1.1 | cut -d " " -f4)
-#
-# The last example is still more ugly, some of the printers only provided
-# their counters without names, but at least always on the same line:
-#
-# requester: external(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public -Ov %(printer)s | grep Counter32 | tail -2 | head -1 | cut -d " " -f2)
-#
-# An example using netcat and a preformatted PJL job which you can find
-# in the untested/pjl directory, which is sent to a JetDirect print
-# server on port 9100 :
-#
-# requester: external(/bin/nc -w 2 %(printer)s 9100 </usr/share/pykota/pagecount.pjl | /usr/bin/tail -2)
-#
-# An example using the contributed pagecount.pl script which does 
-# the same as above, but should work on more printers : 
-#
-# requester: external(/usr/share/pykota/pagecount.pl %(printer)s 9100)
-#
-# WARNING : In any case, when using an external requester, please test the command line outside
-#           of PyKota before. This will save you some headaches in case it doesn't work as expected.
-#
-# The waitprinter.sh is there to wait until the printer is idle again.
-# This should prevent a job to be sent to the printer while another one is 
-# not yet finished (not all pages are printed, but the complete job is in 
-# the printer)
-#
-# YOU ABSOLUTELY HAVE TO BE SURE YOU HAVE A SCRIPT WHICH WAITS FOR THE
-# PRINTER BEING READY BEFORE ASKING FOR ITS INTERNAL PAGE COUNTER.
-#
-# PYKOTA INCLUDES SUCH SCRIPTS FOR SNMP AND APPLETALK PRINTERS, MORE TO COME
-#
-# default value
-requester: external(/usr/share/pykota/waitprinter.sh %(printer)s && /usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
 
 # Default policy for inexistant users (e.g. root)
@@ -395,8 +388,4 @@
 # If both are defined, the printer option has priority.
 # If the value is not set then the default policy DENY applies.
-# ATTENTION :
-#     Before 1.04 the default value was ALLOW, but unknown users
-#     allowed to print causes accuracy problems : their jobs are
-#     charged to the next person who prints on the same printer.
 # There's no policy wrt inexistant groups, they are ignored.
 #
@@ -441,5 +430,5 @@
 # List of available environment variables :
 # NB : Most of these variables are also available during the execution
-# of external commands defined in the accounter, requester or mailto 
+# of external commands defined in the accounter and mailto 
 # directives.
 #
