summaryrefslogtreecommitdiff
path: root/samba/smb-printers.conf
blob: 4b3d448280ca74cdfb14e82f2f8894d508ae347e (plain)
  1. control:
  2.     AddInstallable = ( samba samba_reload )
  3. #
  4. # Variables for the print spooldir
  5. # You can change the rights on the dir in the "directories:"
  6. # section.
  7. #
  8. printdir = ( /var/spool/lpd/sharedprinter )
  9. editfiles:
  10. samba::
  11. { /etc/samba/smb-printers.conf
  12. AutoCreate
  13. #
  14. # [netlogon]
  15. #
  16. BeginGroupIfNoLineMatching "^\[printers\]"
  17. Append '[printers]'
  18. Append ' comment = %S printer'
  19. Append ' path = /tmp'
  20. Append ' print command = /usr/bin/lpr -h -r %s'
  21. Append ' lprm command = /usr/bin/lprm -P%S %j'
  22. Append ' public = yes'
  23. Append ' printable = yes'
  24. EndGroup
  25. DefineClasses "samba_reload"
  26. }
  27. samba_reload::
  28. { /etc/samba/smb-printers.conf
  29. LocateLineMatching "^; EDITED BY CFENGINE .*"
  30. ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)'
  31. CatchAbort
  32. BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*"
  33. Append '; EDITED BY CFENGINE $(date)'
  34. EndGroup
  35. }
  36. directories:
  37. samba::
  38. $(printdir)
  39. mode=777
  40. owmer=root
  41. group=root
  42. processes:
  43. "smbd" restart "/etc/init.d/samba restart"
  44. shellcommands:
  45. samba_reload::
  46. "/etc/init.d/samba force-reload"