From: janw Date: Fri, 11 Jan 2008 10:58:59 +0000 (+0000) Subject: Added Mac formatting rule. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=23a5be39bd6d1216ebab4e6e9d73671f62111204;p=gosa.git Added Mac formatting rule. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8312 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/modules/ServerPackages.pm b/gosa-si/modules/ServerPackages.pm index 9d4e95a7c..62d70c8ac 100644 --- a/gosa-si/modules/ServerPackages.pm +++ b/gosa-si/modules/ServerPackages.pm @@ -253,6 +253,8 @@ sub get_mac { my ($if, $mac)= unpack 'h36 H12', $ifreq; if (length($mac) > 0) { + $mac=~ m/^([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/; + $mac= sprintf("%s:%s:%s:%s:%s:%s", $1, $2, $3, $4, $5, $6); $result = $mac } }