diff options
author | Volker Lendecke <vl@samba.org> | 2011-04-02 18:51:55 +0200 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-04-05 13:12:14 +0200 |
commit | fe35ff2bf98c166b2f3bfbaa171a58727e1ba091 (patch) | |
tree | 8e23998564c1b216a19b1d03738eb530907e963a /source3 | |
parent | 0f08e9d92222b97cfea3fa5c9ac633790cc4f76d (diff) | |
download | samba-fe35ff2bf98c166b2f3bfbaa171a58727e1ba091.tar.gz samba-fe35ff2bf98c166b2f3bfbaa171a58727e1ba091.tar.bz2 samba-fe35ff2bf98c166b2f3bfbaa171a58727e1ba091.zip |
s3: Make vlp printing work by default
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Apr 5 13:12:14 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/param/loadparm.c | 63 |
1 files changed, 55 insertions, 8 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 172e5c446a..0f76f0925a 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -4864,15 +4864,62 @@ static void init_printer_values(struct service *pService) #if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS) case PRINT_TEST: - case PRINT_VLP: - string_set(&pService->szPrintcommand, "vlp print %p %s"); - string_set(&pService->szLpqcommand, "vlp lpq %p"); - string_set(&pService->szLprmcommand, "vlp lprm %p %j"); - string_set(&pService->szLppausecommand, "vlp lppause %p %j"); - string_set(&pService->szLpresumecommand, "vlp lpresume %p %j"); - string_set(&pService->szQueuepausecommand, "vlp queuepause %p"); - string_set(&pService->szQueueresumecommand, "vlp queueresume %p"); + case PRINT_VLP: { + const char *tdbfile; + char *tmp; + + tdbfile = talloc_asprintf( + talloc_tos(), "tdbfile=%s", + lp_parm_const_string(-1, "vlp", "tdbfile", + "/tmp/vlp.tdb")); + if (tdbfile == NULL) { + tdbfile="tdbfile=/tmp/vlp.tdb"; + } + + tmp = talloc_asprintf(talloc_tos(), "vlp %s print %%p %%s", + tdbfile); + string_set(&pService->szPrintcommand, + tmp ? tmp : "vlp print %p %s"); + TALLOC_FREE(tmp); + + tmp = talloc_asprintf(talloc_tos(), "vlp %s lpq %%p", + tdbfile); + string_set(&pService->szLpqcommand, + tmp ? tmp : "vlp lpq %p"); + TALLOC_FREE(tmp); + + tmp = talloc_asprintf(talloc_tos(), "vlp %s lprm %%p %%j", + tdbfile); + string_set(&pService->szLprmcommand, + tmp ? tmp : "vlp lprm %p %j"); + TALLOC_FREE(tmp); + + tmp = talloc_asprintf(talloc_tos(), "vlp %s lppause %%p %%j", + tdbfile); + string_set(&pService->szLppausecommand, + tmp ? tmp : "vlp lppause %p %j"); + TALLOC_FREE(tmp); + + tmp = talloc_asprintf(talloc_tos(), "vlp %s lpresume %%p %%j", + tdbfile); + string_set(&pService->szLpresumecommand, + tmp ? tmp : "vlp lpresume %p %j"); + TALLOC_FREE(tmp); + + tmp = talloc_asprintf(talloc_tos(), "vlp %s queuepause %%p", + tdbfile); + string_set(&pService->szQueuepausecommand, + tmp ? tmp : "vlp queuepause %p"); + TALLOC_FREE(tmp); + + tmp = talloc_asprintf(talloc_tos(), "vlp %s queueresume %%p", + tdbfile); + string_set(&pService->szQueueresumecommand, + tmp ? tmp : "vlp queueresume %p"); + TALLOC_FREE(tmp); + break; + } #endif /* DEVELOPER */ } |