From 72a62bdced7bfea86a3adf6a4b9595dc4eceec3a Mon Sep 17 00:00:00 2001 From: zacheiss Date: Wed, 1 Jul 2009 16:28:43 +0000 Subject: [PATCH] Samba queues, browsing changes. --- gen/cups-print.pc | 14 ++++++++++---- gen/cups-print.sh | 7 +++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/gen/cups-print.pc b/gen/cups-print.pc index 9f974604..0bad9ecd 100644 --- a/gen/cups-print.pc +++ b/gen/cups-print.pc @@ -339,12 +339,20 @@ void do_host(char *host) fprintf(out, "ServerKey /etc/cups/ssl/%s-ipp-key.pem\n", lhost); fprintf(out, "ServerName %s\n", lhost); fprintf(out, "Krb5Keytab /etc/krb5-ipp.keytab\n"); - fprintf(out, "Browsing On\n"); - fprintf(out, "BrowseProtocols cups\n"); + /* fprintf(out, "Browsing On\n"); */ + /* fprintf(out, "BrowseProtocols cups\n"); */ /* The other CUPS servers should be aware of the other hosts' queues, so we'll let them browse each other. */ + fprintf(out, "Include cups.local.conf\n"); + fprintf(out, "Include cups.hosts.conf\n"); + fprintf(out, "Include cups.locations.conf\n"); + fprintf(out, "Include cups.policies.conf\n"); + tarfile_end(tf); + /* cups.hosts.conf */ + out = tarfile_start(tf, "/etc/cups/cups.hosts.conf", 0755, 1, 1, + "root", "lp", now); EXEC SQL DECLARE csr_cupshosts CURSOR FOR SELECT m.name AS cupshosts FROM machine m, printservers ps WHERE m.mach_id = ps.mach_id AND ps.kind = 'CUPS'; @@ -362,8 +370,6 @@ void do_host(char *host) fprintf(out, "BrowsePoll %s\n", cupshosts); } EXEC SQL CLOSE csr_cupshosts; - fprintf(out, "Include cups.locations.conf\n"); - fprintf(out, "Include cups.policies.conf\n"); tarfile_end(tf); diff --git a/gen/cups-print.sh b/gen/cups-print.sh index dab9ad68..c60a2a8c 100755 --- a/gen/cups-print.sh +++ b/gen/cups-print.sh @@ -30,10 +30,17 @@ tar xf $TARFILE || exit $MR_TARERR /etc/cups/bin/gen-ppd.pl /etc/init.d/cups restart + if [ $? != 0 ]; then exit $MR_MKCRED fi +# if Samba-enabled, then restart it too to have it pick up +# new definitions +if [ -x /etc/init.d/smb ]; then + /etc/init.d/smb restart +fi + # cleanup test -f $TARFILE && rm -f $TARFILE test -f $0 && rm -f $0 -- 2.45.1