[Libosinfo] [PATCH 1/2] script: API to query username pattern
Zeeshan Ali (Khattak)
zeeshanak at gnome.org
Wed Aug 26 15:09:32 UTC 2015
On Wed, Aug 26, 2015 at 2:02 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> On Wed, Aug 26, 2015 at 01:21:07PM +0100, Zeeshan Ali (Khattak) wrote:
>> >, there are known limitations on hostname format in
>> > Windows iirc, and we also have user-realname and potentially
>> > admin-password/user-password which could have length/character set
>> > limitations. Rather than adding a new element for each of these, maybe
>> > we'd be better off with
>> > <param name="xxxx" policy="yyyy" format/pattern="zzzz"/> ?
>> > (not sure how convenient it is to stuff a regexp in an XML attribute).
>>
>> I'm not sure I follow your suggestion. Could you please provide an
>> example or two?
>
> Something like
> diff --git a/data/install-scripts/debian.xml b/data/install-scripts/debian.xml
> index b164b01..acb8d01 100644
> --- a/data/install-scripts/debian.xml
> +++ b/data/install-scripts/debian.xml
> @@ -10,6 +10,7 @@
> <param name="l10n-timezone" policy="optional"/>
> <param name="l10n-language" policy="optional"/>
> <param name="target-disk" policy="optional"/>
> + <param name="user-login" policy="required" pattern="^[a-zA-Z][a-zA-Z0-9]*$"/>
Ah, ok. That sounds better indeed.
> </config>
> <injection-method>initrd</injection-method>
> <!-- FIXME: The need of an internet connection may be avoidable. It is
>
> (I think the fact that debian.xml currently does not have a <param name="user-login" policy="required">
> entry is a bug ?)
I can't be sure. These patches were submitted purely based on Lasse's
input on the related Boxes bug.
--
Regards,
Zeeshan Ali (Khattak)
________________________________________
Befriend GNOME: http://www.gnome.org/friends/
More information about the Libosinfo
mailing list