Allow use of no kickstart for systems

Before, if a system had an empty string as kickstart then it would
inherit the one from its profile. It is not desirable if we don't want to use
a kickstart at all, as is the case of attended installations.

Signed-off-by: Alan Evangelista <alanoe@linux.vnet.ibm.com>
Signed-off-by: Andrea Bucci <andreavb@linux.vnet.ibm.com>
Signed-off-by: Eduardo Bacchi Kienetz <ebacchi@linux.vnet.ibm.com>
Signed-off-by: Plinio Freire <pleirie@linux.vnet.ibm.com>
Copy the mode (permissions) for configured files.

This makes the executables executable again.
Remove hardcoded /usr/share/cobbler path

Determine the directories to add to sys.path with the inspect module (they
are relative to the current file)
Support for virtualenv out of the box

If cobbler is installed using a virtualenv python it will use (and setup)
this python for its scripts and wsgi processes automatically.

The directory directives are needed on opensuse since it still uses apache 2.2.
Add some logging in cobblerd

cobblerd failed to start and the backtrace is nowhere to be found (here?).
At least log the message so its possible to fix the problem.
Strip the distribution names

On my system platform.linux_distribution() returns "opensuse " for some reason.
Play safe.
Improve regen_ss_file()

 - use python stdlib instead of os.system()
 - always change the owner of the file. Not only on creation.

The os.system() call failed for me because it tried with user apache that does not exist here.
With this code you can see the problem.
Merge pull request #669 from natoze/support_no_system_kickstart

Allow use of no kickstart for systems
Merge pull request #670 from jansenm/mjansen/small-bugfix

Copy the mode (permissions) for configured files.
Merge pull request #671 from jansenm/mjansen/virtualenv

Mjansen/virtualenv
add support for rhel7
Merge pull request #672 from chjohnst/master

add support for rhel7
Add support for importing rhel4AS

Support importing Red Hat Enterprise Linux 4 AS.
This patch wasn't never submitted after closing the issue #387
https://github.com/cobbler/cobbler/issues/387
Merge pull request #673 from angystardust/patch-1

Add support for importing rhel4AS
Added fedora20 to distro_signatures.json file
cli.py:  more meaningful messages on server exceptions

Make it clear that the exception originates server-side, and don't
trim the string, which may not be enclosed in quotes
utils.py:  fix set_virt_type() when value is <<inherit>>
koan/app.py:  get .ks file from --server host, not profile data

The profile's 'server' attribute address may not be addressable by the
VM host for retrieving the kickstart file to obtain install tree
information.

Instead, retrieve the kickstart file from the cobbler server specified
in the '--server' argument.
koan/app.py:  handle kickstart url '--proxy' argument

'--proxy' is a valid argument for the 'url' and 'repo' kickstart
options:

  url --url http://repos.example.com/repo --proxy=proxy.example.com:3128
koan/utils.py:  fix subprocess_get_response() to work with python 2.6

subprocess.check_output() was introduced in python 2.7, but EL6 is on
python 2.6.

Use the basic Popen() instead.