From: Frank Brehm Date: Mon, 29 May 2017 19:17:36 +0000 (+0200) Subject: saving uncommitted changes in /etc prior to emerge run X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=e7516a753208d6cbfa2a5250f6f438ed426c83c2;p=config%2Fbruni%2Fetc.git saving uncommitted changes in /etc prior to emerge run --- diff --git a/cups/cups-browsed.conf b/cups/cups-browsed.conf index ade5433f..c6613a4b 100644 --- a/cups/cups-browsed.conf +++ b/cups/cups-browsed.conf @@ -6,6 +6,29 @@ # Unknown directives are ignored, also unknown values. +# Where should cups-browsed save information about the print queues it had +# generated when shutting down, like whether one of these queues was the +# default printer, or default option settings of the queues? + +# CacheDir /var/cache/cups + + +# Where should cups-browsed create its debug log file (if "DebugLogging file" +# is set)? + +# LogDir /var/log/cups + + +# How should debug logging be done? Into the file +# /var/log/cups/cups-browsed_log ('file'), to stderr ('stderr'), or +# not at all ('none')? + +# DebugLogging file +# DebugLogging stderr +# DebugLogging file stderr +# DebugLogging none + + # Which protocols will we use to discover printers on the network? # Can use DNSSD and/or CUPS and/or LDAP, or 'none' for neither. @@ -82,6 +105,21 @@ BrowseRemoteProtocols DNSSD,CUPS # BrowseOrder Allow,Deny +# The interval between browsing/broadcasting cycles, local and/or +# remote, can be adjusted with the BrowseInterval directive. + +# BrowseInterval 60 + + +# Browsing-related operations such as adding or removing printer queues +# and broadcasting are each allowed to take up to a given amount of time. +# It can be configured, in seconds, with the BrowseTimeout directive. +# Especially queues discovered by CUPS broadcasts will be removed after +# this timeout if no further broadcast from the server happens. + +# BrowseTimeout 300 + + # Filtering of remote printers by other properties than IP addresses # of their servers @@ -103,7 +141,7 @@ BrowseRemoteProtocols DNSSD,CUPS # field () of the printer's properties to which it should # apply. -# Avaialble field names are: +# Available field names are: # name: Name of the local print queue to be created # host: Host name of the remote print server @@ -255,9 +293,12 @@ BrowseRemoteProtocols DNSSD,CUPS # Use DomainSocket to access the local CUPS daemon via another than the -# default domain socket +# default domain socket. "None" or "Off" lets cups-browsed not use CUPS' +# domain socket. -# DomainSocket /var/lib/run/cups/cups.sock +# DomainSocket /run/cups/cups.sock +# DomainSocket None +# DomainSocket Off # Set IPBasedDeviceURIs to "Yes" if cups-browsed should create its @@ -278,36 +319,98 @@ BrowseRemoteProtocols DNSSD,CUPS # IPBasedDeviceURIs IPv6 -# Set CreateIPPPrinterQueues to "Yes" to let cups-browsed discover IPP +# Set CreateRemoteRawPrinterQueues to "Yes" to let cups-browsed also +# create local queues pointing to remote raw CUPS queues. Normally, +# only queues pointing to remote queues with PPD/driver are created +# as we do not use drivers on the client side, but in some cases +# accessing a remote raw queue can make sense, for example if the +# queue forwards the jobs by a special backend like Tea4CUPS. + +# CreateRemoteRawPrinterQueues Yes + + +# cups-browsed by default creates local print queues for each shared +# CUPS print queue which it discovers on remote machines in the local +# network(s). Set CreateRemoteCUPSPrinterQueues to "No" if you do not +# want cups-browsed to do this. For example you can set cups-browsed +# to only create queues for IPP network printers setting +# CreateIPPPrinterQueues not to "No" and CreateRemoteCUPSPrinterQueues +# to "No". + +# CreateRemoteCUPSPrinterQueues No + + +# Set CreateIPPPrinterQueues to "All" to let cups-browsed discover IPP # network printers (native printers, not CUPS queues) with known page # description languages (PWG Raster, PDF, PostScript, PCL XL, PCL -# 5c/e) in the local network and auto-create PPD-less print queues for -# them (using a System V interface script to control the filter -# chain). Clients have to IPP-poll the capabilities of the printer and -# send option settings as standard IPP attributes. We do not poll the -# capabilities by ourselves to not wake up the printer from +# 5c/e) in the local network and auto-create print queues for them. + +# Set CreateIPPPrinterQueues to "Everywhere" to let cups-browsed +# discover IPP Everywhere printers in the local network (native +# printers, not CUPS queues) and auto-create print queues for them. + +# Set CreateIPPPrinterQueues to "AppleRaster" to let cups-browsed +# discover Apple Raster printers in the local network (native +# printers, not CUPS queues) and auto-create print queues for them. + +# Set CreateIPPPrinterQueues to "Driverless" to let cups-browsed +# discover printers designed for driverless use (currently IPP +# Everywhere and Apple Raster) in the local network (native printers, +# not CUPS queues) and auto-create print queues for them. + +# Set CreateIPPPrinterQueues to "No" to not auto-create print queues +# for IPP network printers. This is the default. + +# If queues with PPD file are created (see IPPPrinterQueueType +# directive below) the PPDs are auto-generated by cups-browsed based +# on properties of the printer polled via IPP. In case of missing +# information, info from the Bonjour record is used asd as last mean +# default values. + +# If queues without PPD (see IPPPrinterQueueType directive below) are +# created clients have to IPP-poll the capabilities of the printer and +# send option settings as standard IPP attributes. Then we do not poll +# the capabilities by ourselves to not wake up the printer from # power-saving mode when creating the queues. Jobs have to be sent in -# PDF format. Other formats are not accepted. This functionality is -# primarily for mobile devices running CUPS to not need a printer -# setup tool nor a collection of printer drivers and PPDs. +# one of PDF, PWG Raster, or JPEG format. Other formats are not +# accepted. -# CreateIPPPrinterQueues Yes +# This functionality is primarily for mobile devices running +# CUPS to not need a printer setup tool nor a collection of printer +# drivers and PPDs. + +# CreateIPPPrinterQueues No +# CreateIPPPrinterQueues Everywhere +# CreateIPPPrinterQueues AppleRaster +# CreateIPPPrinterQueues Everywhere AppleRaster +# CreateIPPPrinterQueues Driverless +# CreateIPPPrinterQueues All # If cups-browsed is automatically creating print queues for native # IPP network printers ("CreateIPPPrinterQueues Yes"), the type of # queue to be created can be selected by the "IPPPrinterQueueType" -# directive. The "PPD" setting makes always queues with PPD file -# being created and no queue if the printer does not supply sufficient -# information for creating a PPD. With "NoPPD" the queue is always -# created with a System V interface script as filter, also when -# creatig a PPD would be possible. "Auto" (the default) lets a PPD -# being created if the printer supplies sufficient information and a -# System V interface script otherwise. +# directive. The "PPD" (default) setting makes queues with PPD file +# being created. With "Interface" or "NoPPD" the queue is created with +# a System V interface script (Not supported with CUPS 2.2.x or +# later). "Auto" is for backward compatibility and also lets queues +# with PPD get created. -# IPPPrinterQueueType Auto # IPPPrinterQueueType PPD # IPPPrinterQueueType NoPPD +# IPPPrinterQueueType Interface +# IPPPrinterQueueType Auto + + +# The NewIPPPrinterQueuesShared directive determines whether a print +# queue for a newly discovered IPP network printer (not remote CUPS +# queue) will be shared to the local network or not. This is only +# valid for newly discovered printers. For printers discovered in an +# earlier cups-browsed session, cups-browsed will remember whether the +# printer was shared, so changes by the user get conserved. Default is +# not to share newly discovered IPP printers. + +# NewIPPPrinterQueuesShared Yes # The LoadBalancing directive switches between two methods of handling @@ -368,21 +471,34 @@ BrowseRemoteProtocols DNSSD,CUPS # The AutoShutdown directive specifies whether cups-browsed should # automatically terminate when it has no local raw queues set up -# pointing to any discovered remote printers (auto shutdown -# mode). Setting it to "On" activates the auto-shutdown mode, setting -# it to "Off" deactiivates it (the default). The special mode "avahi" -# turns auto shutdown off while avahi-daemon is running and on when -# avahi-daemon stops. This allows running cups-browsed on-demand when -# avahi-daemon is run on-demand. +# pointing to any discovered remote printers or no jobs on such queues +# depending on AutoShutdownOn setting (auto shutdown mode). Setting it +# to "On" activates the auto-shutdown mode, setting it to "Off" +# deactiivates it (the default). The special mode "avahi" turns auto +# shutdown off while avahi-daemon is running and on when avahi-daemon +# stops. This allows running cups-browsed on-demand when avahi-daemon +# is run on-demand. # AutoShutdown Off # AutoShutdown On # AutoShutdown avahi +# The AutoShutdownOn directive determines what event cups-browsed +# considers as inactivity in auto shutdown mode. "NoQueues" (the +# default) means that auto shutdown is initiated when there are no +# queues for discovered remote printers generated by cups-browsed any +# more. "NoJobs" means that all queues generated by cups-browsed are +# without jobs. + +# AutoShutdownOn NoQueues +# AutoShutdownOn NoJobs + + # The AutoShutdownTimeout directive specifies after how many seconds # without local raw queues set up pointing to any discovered remote -# printers cups-browsed should actually shut down in auto shutdown -# mode. Default is 30 seconds, 0 means immediate shutdown. +# printers or jobs on these queues cups-browsed should actually shut +# down in auto shutdown mode. Default is 30 seconds, 0 means immediate +# shutdown. # AutoShutdownTimeout 30 diff --git a/init.d/cups-browsed b/init.d/cups-browsed index 6f5b30a2..dddfe7bf 100755 --- a/init.d/cups-browsed +++ b/init.d/cups-browsed @@ -1,20 +1,9 @@ #!/sbin/openrc-run -PIDFILE=/var/run/cups-browsed.pid +pidfile="/var/run/cups-browsed.pid" +command="/usr/sbin/cups-browsed" +command_background="true" depend() { need cupsd avahi-daemon } - -start() { - ebegin "Starting cups-browsed" - start-stop-daemon --start --make-pidfile --pidfile "${PIDFILE}" \ - --background --quiet --exec /usr/sbin/cups-browsed - eend $? -} - -stop() { - ebegin "Stopping cups-browsed" - start-stop-daemon --stop --pidfile "${PIDFILE}" --quiet --exec /usr/sbin/cupsd - eend $? -}