Welcome! Log In Create A New Profile

Advanced

Bug in installer Script

Posted by blusseau 
Bug in installer Script
April 09, 2011 03:39AM
Hi,

i have found a bug in the installation script (http://jeff.doozan.com/debian/dockstar.debian-squeeze.sh).

You create some script like zz-flash-kernel without escaping variables (the variables was expanded when the file is written to disk):
cat <<END > $ROOT/etc/kernel/postinst.d/zz-flash-kernel
#!/bin/sh

version="$1"
bootopt=""

# passing the kernel version is required
[ -z "${version}" ] && exit 0

echo "Running flash-kernel ${version}"
flash-kernel ${version}
END

So when the script is really create is it like this:
#!/bin/sh

version=""
bootopt=""

# passing the kernel version is required
[ -z "" ] && exit 0

echo "Running flash-kernel "
flash-kernel

Regards,
Yves
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: