From: Michael Tremer Date: Thu, 17 Jun 2010 22:11:41 +0000 (+0200) Subject: network: Speedup function device_hash. X-Git-Tag: 001~91 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37e4ec8b47e48b6af767f18380e20534fa4b2d17;p=people%2Fms%2Fnetwork.git network: Speedup function device_hash. --- diff --git a/functions.device b/functions.device index 102c5cea..3fe531ff 100644 --- a/functions.device +++ b/functions.device @@ -293,7 +293,11 @@ function device_rename() { function device_hash() { local device=${1} - macify ${device} | tr -d ':' + # Get mac address of device and remove all colons (:) + # that will result in a hash. + device=$(macify ${device}) + + echo "${device//:/}" } # Give the device a new name