diff options
Diffstat (limited to 'utils/rubbos_dev_env_setup/mac_generator.sh')
-rwxr-xr-x | utils/rubbos_dev_env_setup/mac_generator.sh | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/utils/rubbos_dev_env_setup/mac_generator.sh b/utils/rubbos_dev_env_setup/mac_generator.sh deleted file mode 100755 index ef78f5f6..00000000 --- a/utils/rubbos_dev_env_setup/mac_generator.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# this is a modified copy from compass4nfv/deploy/mac_generator.sh - -function mac_address_part() { - hex_number=$(printf '%02x' $RANDOM) - number_length=${#hex_number} - number_start=$(expr $number_length - 2) - echo ${hex_number:$number_start:2} -} - -function mac_address() { - echo "00:00:$(mac_address_part):$(mac_address_part):$(mac_address_part):$(mac_address_part)" -} - -machines='' -for i in `seq $1`; do - mac=$(mac_address) - - if [[ -z $machines ]]; then - machines="${mac}" - else - machines="${machines} ${mac}" - fi -done - -echo ${machines} - |