Fix hpux printing
authorJamie Cameron <jcameron@webmin.com>
Tue, 18 Oct 2011 17:40:42 +0000 (10:40 -0700)
committerJamie Cameron <jcameron@webmin.com>
Tue, 18 Oct 2011 17:40:42 +0000 (10:40 -0700)
lpadmin/hpux-lib.pl
lpadmin/lpadmin-lib.pl

index b596c8b..1c81da2 100755 (executable)
@@ -76,7 +76,7 @@ if ($con =~ /^device for \S+:\s+(\S+)\n\s+(remote to:)\s+(\S+)\s+(on)\s+(\S+)/)
 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;
        }
index 108d6ee..cbd01f7 100755 (executable)
@@ -165,7 +165,7 @@ else {
          $_[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'}) {