The suspects - and indeed they've tried to escape:
" vs. '
In /tmp/foomatic-rip.log we have:
renderer command: level=0; /usr/bin/printf "%%!\n%%%% %%%%\n<</Duplex false>>setpagedevice\n"; if [ $level -gt 0 ]; then if [ $level -lt 99 ]; then level=" -dLanguageLevel=$level"; else level=""; fi; gs -q -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pswrite$level -sOutputFile=- -; else cat; fi
This is from line 3567 of /usr/bin/foomatic-rip which tries to run:
system("$commandline");
See the nested, unescaped double quotes colliding...
Now even on the plain shell prompt we can only expect garbled output from
:~$ /usr/bin/printf "%%!\n%%%% %%%%\n<</Duplex false>>setpagedevice\n"
bash: !\n%%%%: event not found
...and nor does the following look right to me:
else cat; fi
Now if someone more familiar with that code could figure out where the /usr/bin/printf statements used in the invocations of rendercmd and the subsequent cmd and currentcmd are constructed, and if they are what makes the script fail
[at least it terminates without error, albeit without proper results as well, as soon as the above is changed to system('$commandline');],
I'd suggest replacing them with single quotes - rather than doing the same only for the system() calls which would make CUPS believe the jobs had been completed while producing empty output.
The suspects - and indeed they've tried to escape:
" vs. '
In /tmp/foomatic- rip.log we have:
renderer command: level=0; /usr/bin/printf "%%!\n%%%% %%%%\n<</Duplex false>> setpagedevice\ n"; if [ $level -gt 0 ]; then if [ $level -lt 99 ]; then level=" -dLanguageLevel =$level" ; else level=""; fi; gs -q -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE= pswrite$ level -sOutputFile=- -; else cat; fi
This is from line 3567 of /usr/bin/ foomatic- rip which tries to run: "$commandline" );
system(
See the nested, unescaped double quotes colliding...
Now even on the plain shell prompt we can only expect garbled output from setpagedevice\ n"
:~$ /usr/bin/printf "%%!\n%%%% %%%%\n<</Duplex false>>
bash: !\n%%%%: event not found
...and nor does the following look right to me:
else cat; fi
Now if someone more familiar with that code could figure out where the /usr/bin/printf statements used in the invocations of rendercmd and the subsequent cmd and currentcmd are constructed, and if they are what makes the script fail '$commandline' );],
[at least it terminates without error, albeit without proper results as well, as soon as the above is changed to system(
I'd suggest replacing them with single quotes - rather than doing the same only for the system() calls which would make CUPS believe the jobs had been completed while producing empty output.