summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2005-09-16 15:11:57 +0000
committerDaouda Lo <daouda@mandriva.com>2005-09-16 15:11:57 +0000
commitfabde284dc0e5ee2f85a5f529832d7c6989f248c (patch)
treea26199232755b74d926bea76ef80ebdc2dbfa586
parent26af17696be476cbe763d90aec1e8d5d157ecb1e (diff)
downloadmgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.tar
mgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.tar.gz
mgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.tar.bz2
mgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.tar.xz
mgaonline-fabde284dc0e5ee2f85a5f529832d7c6989f248c.zip
- check valid machine name
-rw-r--r--mdkonline.pm7
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;