1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

ctdb-tests: Replace md5sum with posix cksum

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13520

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 22c3078c8b)
This commit is contained in:
Amitay Isaacs 2018-07-19 16:10:15 +10:00 committed by Karolin Seeger
parent 862aedcd30
commit 0be07aec5b
3 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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 <<EOF
1: ${CTDB_NATGW_PUBLIC_IFACE}: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000

View File

@ -124,7 +124,7 @@ ip_link_show ()
_opts="<LOOPBACK${_flags}> 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="<BROADCAST,MULTICAST${_flags}> mtu 1500 qdisc pfifo_fast state ${_state} qlen 1000"