From 23a5be39bd6d1216ebab4e6e9d73671f62111204 Mon Sep 17 00:00:00 2001 From: janw Date: Fri, 11 Jan 2008 10:58:59 +0000 Subject: [PATCH] Added Mac formatting rule. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8312 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/ServerPackages.pm | 2 ++ 1 file changed, 2 insertions(+) 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 } } -- 2.30.2