Re: [PATCH 1/2] script: API to query username pattern

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

 



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]*$"/>
     </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 ?)

Christophe

Attachment: pgp1R4JGoSSG5.pgp
Description: PGP signature

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux