bootstrap-vz/bootstrapvz/common/tasks
Brendan Harley df3a200df3 Fix unfailing CheckExternalCommands
On Unix, with shell=True, the shell default to /bin/sh.
Using Popen(['type', command], shell=True) is equivalent to calling
Popen(['/bin/sh', '-c', 'type', command]).
In this case 'command' becomes a positional parameter to the shell,
and not an argument to the command 'type'.

The solution is to pass a single string as parameter.

The problem is that with shell=True, we are never safe from a shell injection,
so it is wiser to use a python only solution.

The package distutils is part of the standard distribution, so it doesn't add
extra dependencies.
The method find_executable has the same behaviour as 'which' on bash.
2017-05-31 22:28:04 +02:00
..
__init__.py Systematically use rel_path for relative paths 2016-09-12 19:11:20 +02:00
apt.py Fixes to create stretch images. Add stretch manifest for GCE. 2017-01-10 13:30:31 -08:00
boot.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
bootstrap.py Moving host_dependencies tasks to the validation phase 2016-09-12 01:12:19 +02:00
cleanup.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
development.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
extlinux.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
filesystem.py type is never going to be a partition 2017-02-04 16:15:24 +01:00
folder.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
grub.py grub: Prettier type checking when writing grub defaults 2016-06-05 13:20:34 +02:00
host.py Fix unfailing CheckExternalCommands 2017-05-31 22:28:04 +02:00
image.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
initd.py Stretch (9.0) patch #3 - EC2: fixing insserv & + 2016-09-24 19:03:28 +01:00
kernel.py Move some package adding tasks into the preparation phase 2017-04-15 10:01:27 +02:00
locale.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
loopback.py Moving host_dependencies tasks to the validation phase 2016-09-12 01:12:19 +02:00
network-configuration.yml Add lo to jessie network config 2016-06-04 19:23:59 +02:00
network.py Systematically use rel_path for relative paths 2016-09-12 19:11:20 +02:00
packages.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
partitioning.py Moving host_dependencies tasks to the validation phase 2016-09-12 01:12:19 +02:00
security.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
ssh.py Fix bug in Stretch builds. sshd_config no longer contains 2017-03-28 20:24:41 +02:00
volume.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00
workspace.py Convert indentation from tabs to spaces (4) 2016-06-04 11:38:16 +02:00