Package: fai
Version: 2.8.4
Tags: patch

The shell evaluation code in install_package is broken because of two
things:
1) the regexp on row 338 is missing a backslash before $.
2) the list of packages name is being split on whitespace somewhere

How to reproduce:
Add a package which name contains $kernelversion to a file of choice
in package_config/ (kernel-doc-2.6.8 for example)
Neither of the following two work:
kernel-doc-$kernelversion
kernel-doc-`echo $kernelversion`

A patch to fix the regexp typo (but not the backtick problem):
--- /usr/sbin/install_packages.orig      2005-08-09 13:52:10.113719432 +0200
+++ /usr/sbin/install_packages   2005-08-09 13:52:14.626033456 +0200
@@ -335,7 +335,7 @@
 
   foreach my $pack (@orig) {
 
-    if ($pack =~ /[$\`]/) {
+    if ($pack =~ /[\$\`]/) {
       # evaluate via shell if backtick or $ is found
       my $packeval=`echo -n $pack`;
       print " Selecting $packeval for $pack";


/Hannes

-- 
main(){double s=0,n=1;for(;n<2<<23;s+=4/n-4/(n+2),n+=4);printf("%f",s);}
/* [EMAIL PROTECTED],cs}.umu.se  www.{acc,cs}.umu.se/~hannes  ICQ#27865609  *\
\*         finger [EMAIL PROTECTED] for my public key          */


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to