3735450 If --hostname is provided for ipa-client-install use it everywhere.

Authored and Committed by rcritten 13 years ago
    If --hostname is provided for ipa-client-install use it everywhere.
    
    If a hostname was provided it wasn't used to configure either
    certmonger or sssd. This resulted in a non-working configuration.
    
    Additionally on un-enrollment the wrong hostname was unenrolled, it
    used the value of gethostname() rather than the one that was passed
    into the installer.
    
    We have to modify the CA configuration of certmonger to make it
    use the right principal when requesting certificates. The filename
    is unpredicable but it will be in /var/lib/certmonger/cas.
    We need to hunt for ipa_submit and add -k <principal> to it, then
    undo that on uninstall. These files are created the first time
    the certmonger service starts, so start and stop it before messing
    with them.
    
    ticket 1029
    
        
file modified
+78 -2