pf-tools commit: r609 [ccaillet-guest] - /trunk/lib/PFTools/Conf.pm

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Fri Jul 11 15:58:18 UTC 2008


Author: ccaillet-guest
Date: Fri Jul 11 15:58:17 2008
New Revision: 609

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=609
Log:
fix regexp hosttype

Modified:
    trunk/lib/PFTools/Conf.pm

Modified: trunk/lib/PFTools/Conf.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Conf.pm?rev=609&op=diff
==============================================================================
--- trunk/lib/PFTools/Conf.pm (original)
+++ trunk/lib/PFTools/Conf.pm Fri Jul 11 15:58:17 2008
@@ -88,8 +88,8 @@
 
 chomp( $SUBST{'OS_RELEASE'} = `/bin/uname -r` );
 
-$SUBST{'HOSTNAME'} =~ m/^(.*?)(\d*)([a-z]*)$/;
-
+# $SUBST{'HOSTNAME'} =~ m/^(.*?)(\d*)([a-z]*)$/;
+$SUBST{'HOSTNAME'} =~ m/^(([a-z]{3}[\d]{1})-)?([a-z\-]+)([\d]*)([a-z]*)$/;
 $SUBST{'HOSTTYPE'}      = $1;
 $SUBST{'HOSTDIGITS'}    = $2;
 $SUBST{'HOSTCLUSTER'}   = $1 . $2;




More information about the pf-tools-commits mailing list