Linux Newbie help
 help / color / mirror / Atom feed
From: whitnl73@juno.com
To: kurt.sys@rug.ac.be
Cc: linux-newbie@vger.kernel.org
Subject: Re: smbprint
Date: Fri, 14 Feb 2003 20:15:49 -0500 (EST)	[thread overview]
Message-ID: <20030214.215139.8.2.whitnl73@juno.com> (raw)
In-Reply-To: <15948.63078.810448.32226@ksys.rug.ac.be>

On Fri, 14 Feb 2003, Kurt Sys wrote:

> Hello,
>
> I try to get samba to work, especially the printing to a windows NT network printer. I can print to the printer by using smbprint etc, but this always takes some time (first 'gs -sDEVICE=ljet -sOutputFile=file.hp file.pdf' followed by 'smbclient \\\\labmetserver\\HPLaserJ -Ukurts%xxxxx' and finally giving the command 'print file.hp'). So, I decided to try to make an entry in my printcap-file (I show it here, although I'm sure that this doesn't matter for the problem I have...):

...
>
> And then I had to make two more files (these are the important ones, I guess):
> /var/spool/lpd/smb0/.config:
> ----
> server = LABMETSERVER
> service = HPLaserJ
> user = kurts
> password = "xxxxxx"
> ----
>
> and the file /usr/local/bin/smbprint:
> ----
> #!/bin/sh -x
>
> logfile=/tmp/smb-print.log
>
> eval acct_file=\$$#
>
> spool_dir=/var/spool/lpd/smb0
> config_file=$spool_dir/.config
>
> eval cat $config_file

Excuse me?  Why do you think this will set any shell variables?
This is just going to copy your config file to stdout.
See "help eval" and man cat.

I think you want something like

tn=`mktemp /tmp/x.XXXXXXX` && sed 's/ //g' $cf >$tn && source $tn && rm $tn
unset tn

AFAIK, the way to set a shell variable is: "name=value",
not "name = value", hence the sed
>
> Apparently, the variables 'server', 'service', 'user' and 'password' are not read (since they are replaced by nothing). What am I doing wrong?
>
why would cat be setting variables?
>
> thanks in advance,
> Kurt
> -
>
Lawson

--
---oops---



________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2003-02-15  1:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-14 14:00 smbprint Kurt Sys
2003-02-15  1:15 ` whitnl73 [this message]
2003-02-17 11:25   ` smbprint Kurt Sys

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030214.215139.8.2.whitnl73@juno.com \
    --to=whitnl73@juno.com \
    --cc=kurt.sys@rug.ac.be \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox