summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/SGI/sambalp8
1 files changed, 6 insertions, 2 deletions
diff --git a/packaging/SGI/sambalp b/packaging/SGI/sambalp
index 61e62215c9..27ca5165f9 100644
--- a/packaging/SGI/sambalp
+++ b/packaging/SGI/sambalp
@@ -50,8 +50,9 @@ $PSFIX = 1; # set to 0 if you don't want to run
EOF
$ENV{'PATH'} = join(':',@PATH);
-if ($#ARGV < 3) {
- print STDERR "usage: $PROG printer file user system\n";
+ print "$#ARGV ".scalar(@ARGV)."\n";
+if (scalar(@ARGV) < 2) {
+ print STDERR "usage: $PROG printer file [user] [system]\n";
exit;
}
@@ -60,6 +61,9 @@ $file = $ARGV[1];
$user = $ARGV[2];
$system = $ARGV[3];
+$user = "nobody" unless($user);
+$system = `hostname` unless($system);
+
open(LPSTAT,"/usr/bin/lpstat -t|") || die("Can't get printer list.\n");
@printers = ();
while (<LPSTAT>) {