summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/detect.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/printer/detect.pm')
-rw-r--r--perl-install/printer/detect.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/perl-install/printer/detect.pm b/perl-install/printer/detect.pm
index 8455fe06e..e1583e311 100644
--- a/perl-install/printer/detect.pm
+++ b/perl-install/printer/detect.pm
@@ -186,7 +186,7 @@ sub whatNetPrinter {
# delays caused by machines blocking their ports with a firewall
local *F;
open F, ($::testing ? "" : "chroot $::prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; nmap -r -P0 --host_timeout 400 --initial_rtt_timeout 200 -p $portlist $hostlist\" |"
+ qq(/bin/sh -c "export LC_ALL=C; nmap -r -P0 --host_timeout 400 --initial_rtt_timeout 200 -p $portlist $hostlist" |)
or return @res;
my ($host, $ip, $port, $modelinfo) = ("", "", "", "");
while (my $line = <F>) {
@@ -252,7 +252,7 @@ sub getNetworkInterfaces() {
local *IFCONFIG_OUT;
open IFCONFIG_OUT, ($::testing ? "" : "chroot $::prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; ifconfig\" |" or return ();
+ '/bin/sh -c "export LC_ALL=C; ifconfig" |' or return ();
while (my $readline = <IFCONFIG_OUT>) {
# New entry ...
if ($readline =~ /^(\S+)\s/) {
@@ -283,7 +283,7 @@ sub getIPsOfLocalMachine() {
local *IFCONFIG_OUT;
open IFCONFIG_OUT, ($::testing ? "" : "chroot $::prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; ifconfig\" |" or return ();
+ '/bin/sh -c "export LC_ALL=C; ifconfig" |' or return ();
while (my $readline = <IFCONFIG_OUT>) {
# New entry ...
if ($readline =~ /^(\S+)\s/) {
@@ -325,7 +325,7 @@ sub getIPsInLocalNetworks() {
local *IFCONFIG_OUT;
open IFCONFIG_OUT, ($::testing ? "" : "chroot $::prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; ifconfig\" |" or return ();
+ '/bin/sh -c "export LC_ALL=C; ifconfig" |' or return ();
while (my $readline = <IFCONFIG_OUT>) {
# New entry ...
if ($readline =~ /^(\S+)\s/) {
@@ -357,7 +357,7 @@ sub getIPsInLocalNetworks() {
foreach my $bcast (@local_bcasts) {
local *F;
open F, ($::testing ? "" : "chroot $::prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; ping -w 1 -b -n $bcast | cut -f 4 -d ' ' | sed s/:// | egrep '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+' | uniq | sort\" |"
+ qq(/bin/sh -c "export LC_ALL=C; ping -w 1 -b -n $bcast | cut -f 4 -d ' ' | sed s/:// | egrep '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+' | uniq | sort" |)
or next;
local $_;
while (<F>) { chomp; push @addresses, $_ }
@@ -365,7 +365,7 @@ sub getIPsInLocalNetworks() {
if (-x "/usr/bin/nmblookup") {
local *F;
open F, ($::testing ? "" : "chroot $::prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; nmblookup -B $bcast \\* | cut -f 1 -d ' ' | egrep '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+' | uniq | sort\" |"
+ qq(/bin/sh -c "export LC_ALL=C; nmblookup -B $bcast \\* | cut -f 1 -d ' ' | egrep '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+' | uniq | sort" |)
or next;
local $_;
while (<F>) {
@@ -384,7 +384,7 @@ sub getSMBPrinterShares {
# SMB request to auto-detect shares
local *F;
open F, ($::testing ? "" : "chroot $::prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; smbclient -N -L $host\" |" or return ();
+ qq(/bin/sh -c "export LC_ALL=C; smbclient -N -L $host" |) or return ();
my $insharelist = 0;
my @shares;
while (my $l = <F>) {
@@ -416,7 +416,7 @@ sub getSNMPModel {
# SNMP request to auto-detect model
local *F;
open F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
- "/bin/sh -c \"scli -v 1 -c 'show printer info' $host\" |" or
+ qq(/bin/sh -c "scli -v 1 -c 'show printer info' $host" |) or
return { CLASS => 'PRINTER',
MODEL => N("Unknown Model"),
MANUFACTURER => "",
@@ -477,8 +477,8 @@ sub network_running() {
# If the network is not running return 0, otherwise 1.
local *F;
open F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; /sbin/ifconfig\" |" or
- die "Could not run \"ifconfig\"!";
+ '/bin/sh -c "export LC_ALL=C; /sbin/ifconfig" |' or
+ die 'Could not run "ifconfig"!';
while (my $line = <F>) {
if ($line !~ /^lo\s+/ && # The loopback device can have been
# started by the spooler's startup script