lxc / lxc-templates

Old style template scripts for LXC (prefer distrobuilder)
GNU Lesser General Public License v2.1
53 stars 56 forks source link

lxc-debian uses basename instead of dirname when setting up the interpreter for a foreign architecture #26

Closed anders-code closed 4 years ago

anders-code commented 4 years ago

When attempting to copy a statically linked interpreter, the script intends to create the target folder mkdir -p. However, the target created is the basename, not the dirname of the target path of the interpreter. This will likely still function if the target directory happens to exist (e.g. rootfs/usr/bin), but may also create a nonsense folder in the working path. In the line below, basename should be replaced with dirname.

mkdir -p "$(basename "$cache/partial-$release-$arch/$interpreter_path")"