diff options
author | Daouda Lo <daouda@mandriva.com> | 2005-09-16 15:11:57 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2005-09-16 15:11:57 +0000 |
commit | fabde284dc0e5ee2f85a5f529832d7c6989f248c (patch) | |
tree | a26199232755b74d926bea76ef80ebdc2dbfa586 /mdkonline.pm | |
parent | 26af17696be476cbe763d90aec1e8d5d157ecb1e (diff) | |
download | mgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.tar mgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.tar.gz mgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.tar.bz2 mgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.tar.xz mgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.zip |
- check valid machine name
Diffstat (limited to 'mdkonline.pm')
-rw-r--r-- | mdkonline.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mdkonline.pm b/mdkonline.pm index aa460f56..cf35a8d7 100644 --- a/mdkonline.pm +++ b/mdkonline.pm @@ -136,6 +136,13 @@ sub check_valid_email { return $st } +sub check_valid_boxname { + my $boxname = shift; + return 0 if length($boxname) >= 40; + my $bt = $boxname =~ /^[a-zA-Z][a-zA-Z0-9]+$/i ? 1 : 0; + $bt +} + sub rpm_ver_parse { my ($ver) = @_; my @verparts; |