diff --git a/ctdb/config/functions b/ctdb/config/functions index 09b32097e01..7a47c9d8e79 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -867,8 +867,8 @@ if ! type mktemp >/dev/null 2>&1 ; then fi _d="${TMPDIR:-/tmp}" _hex10=$(dd if=/dev/urandom count=20 2>/dev/null | \ - md5sum | \ - sed -e 's@\(..........\).*@\1@') + cksum | \ + awk '{print $1}') _t="${_d}/tmp.${_hex10}" ( umask 077 diff --git a/ctdb/tests/eventscripts/scripts/11.natgw.sh b/ctdb/tests/eventscripts/scripts/11.natgw.sh index 1bdcb690b15..75b2771899c 100644 --- a/ctdb/tests/eventscripts/scripts/11.natgw.sh +++ b/ctdb/tests/eventscripts/scripts/11.natgw.sh @@ -46,8 +46,8 @@ EOF ok_natgw_master_ip_addr_show () { _mac=$(echo "$CTDB_NATGW_PUBLIC_IFACE" | - md5sum | - sed -r -e 's@(..)(..)(..)(..)(..)(..).*@\1:\2:\3:\4:\5:\6@') + cksum | + sed -r -e 's@(..)(..)(..).*@fe:fe:fe:\1:\2:\3@') # This is based on CTDB_NATGW_PUBLIC_IP _brd="10.1.1.255" @@ -63,8 +63,8 @@ EOF ok_natgw_slave_ip_addr_show () { _mac=$(echo "$CTDB_NATGW_PUBLIC_IFACE" | - md5sum | - sed -r -e 's@(..)(..)(..)(..)(..)(..).*@\1:\2:\3:\4:\5:\6@') + cksum | + sed -r -e 's@(..)(..)(..).*@fe:fe:fe:\1:\2:\3@') ok < mtu 1500 qdisc pfifo_fast state UP qlen 1000 diff --git a/ctdb/tests/eventscripts/stubs/ip b/ctdb/tests/eventscripts/stubs/ip index 1c4ad35b50a..630d0e8b433 100755 --- a/ctdb/tests/eventscripts/stubs/ip +++ b/ctdb/tests/eventscripts/stubs/ip @@ -124,7 +124,7 @@ ip_link_show () _opts=" mtu 65536 qdisc noqueue state UNKNOWN" ;; *) - _mac=$(echo $dev | md5sum | sed -r -e 's@(..)(..)(..)(..)(..)(..).*@\1:\2:\3:\4:\5:\6@') + _mac=$(echo $dev | cksum | sed -r -e 's@(..)(..)(..).*@fe:fe:fe:\1:\2:\3@') _brd="ff:ff:ff:ff:ff:ff" _type="ether" _opts=" mtu 1500 qdisc pfifo_fast state ${_state} qlen 1000"