elsif ($con =~ /^device for \S+:\s+(\S+)/) { $prn{'dev'} = $1; }
# Check if this is the default printer
-if (&backquote_command("$lpstat -d 2>&1", 1) =~ /destination:\s+(\S+)/ &&
+if (&backquote_command("lpstat -d 2>&1", 1) =~ /: (\S+)/ &&
$1 eq $prn{'name'}) {
$prn{'default'} = 1;
}
$_[1]->{'pass'} ? $_[1]->{'pass'} : "-N",
$_[1]->{'user'} ? " -U $_[1]->{'user'}" : "",
$_[1]->{'workgroup'} ? " -W $_[1]->{'workgroup'}" : "",
- " -c \"print /tmp/\$\$.smb\" -P\n");
+ " -c \"print /tmp/\$\$.smb\"\n");
&print_tempfile(DRV, "rm /tmp/\$\$.smb\n");
&close_tempfile(DRV);
if ($config{'iface_owner'}) {