Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --with-idle-exit-timeout configure option #294

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CHANGES - OpenPrinting CUPS 2.4rc1 - 2021-11-12
Changes in CUPS v2.4.0 (TBA)
---------------------------

- Added configure option --with-idle-exit-timeout (Issue #294)
- DigestOptions now are applied for MD5 Digest authentication defined
by RFC 2069 as well (Issue #287)
- Fixed compilation on Solaris (Issue #293)
Expand Down
3 changes: 3 additions & 0 deletions conf/cupsd.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ DefaultAuthType Basic
# Web interface setting...
WebInterface @CUPS_WEBIF@

# Timeout after cupsd exits if idle (applied only if cupsd runs on-demand - with -l)
IdleExitTimeout @EXIT_TIMEOUT@

# Restrict access to the server...
<Location />
Order allow,deny
Expand Down
13 changes: 13 additions & 0 deletions config-scripts/cups-defaults.m4
Original file line number Diff line number Diff line change
Expand Up @@ -428,3 +428,16 @@ AS_IF([test $CUPS_WEBIF = Yes || test $CUPS_BROWSING = Yes], [
SYSTEMD_WANTED_BY="$SYSTEMD_WANTED_BY multi-user.target"], [
])
AC_SUBST([SYSTEMD_WANTED_BY])

dnl Set default value of IdleExitTimeout
AC_ARG_WITH([idle_exit_timeout], AS_HELP_STRING([--with-idle-exit-timeout], [set the default value for IdleExitTimeout, default=60]), [
AS_IF([test "x$withval" = "xno"], [
EXIT_TIMEOUT=0
], [
EXIT_TIMEOUT=$withval
])
], [
EXIT_TIMEOUT=60
])

AC_SUBST([EXIT_TIMEOUT])
30 changes: 30 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ ac_subst_vars='LTLIBOBJS
LIBOBJS
UNINSTALL_LANGUAGES
INSTALL_LANGUAGES
EXIT_TIMEOUT
SYSTEMD_WANTED_BY
CUPS_WEBIF
DEFAULT_IPP_PORT
Expand Down Expand Up @@ -939,6 +940,7 @@ with_snmp_address
with_snmp_community
with_ipp_port
enable_webif
with_idle_exit_timeout
'
ac_precious_vars='build_alias
host_alias
Expand Down Expand Up @@ -1665,6 +1667,9 @@ Optional Packages:
--with-snmp-address set SNMP query address, default=auto
--with-snmp-community set SNMP community, default=public
--with-ipp-port set port number for IPP, default=631
--with-idle-exit-timeout
set the default value for IdleExitTimeout,
default=60

Some influential environment variables:
CC C compiler command
Expand Down Expand Up @@ -12104,6 +12109,31 @@ fi



# Check whether --with-idle_exit_timeout was given.
if test ${with_idle_exit_timeout+y}
then :
withval=$with_idle_exit_timeout;
if test "x$withval" = "xno"
then :

EXIT_TIMEOUT=0

else $as_nop

EXIT_TIMEOUT=$withval

fi

else $as_nop

EXIT_TIMEOUT=60

fi





INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
Expand Down