[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libosinfo] [PATCHv2] install-config: Document hostname limitations



On Wed, May 21, 2014 at 01:06:02PM +0100, Zeeshan Ali (Khattak) wrote:
> Since Microsoft Windows has several limitations on allowed characters and
> number of characters in ComputerName (which is what hostname is
> translated to), lets inform the app developers about these limitations.
> 
> http://technet.microsoft.com/en-us/library/ff715676.aspx
> ---
>  osinfo/osinfo_install_config.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
> index de4ee42..af0f007 100644
> --- a/osinfo/osinfo_install_config.c
> +++ b/osinfo/osinfo_install_config.c
> @@ -343,6 +343,19 @@ const gchar *osinfo_install_config_get_reg_product_key(OsinfoInstallConfig *conf
>                                           OSINFO_INSTALL_CONFIG_PROP_REG_PRODUCTKEY);
>  }
>  
> +/**
> + * osinfo_install_config_set_hostname:
> + * @config: the install config
> + * @hostname: the desired hostname
> + *
> + * Sets the #OSINFO_INSTALL_CONFIG_PROP_HOSTNAME parameter.
> + *
> + * Note that some operating systems have restrictions on maximum number of, and
> + * allowed characters in hostname (or its equivalent) so it is highly
> + * recommended that you keep the actual hostname less than or equal to 15
> + * characters long and make sure that it does not contain any characters other
> + * than ASCII alphanumeric and '-'.

I'd add
"Automatic installation may fail if the OS has restrictions on this value
and it contains invalid characters."

Christophe


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]