mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Using the same technique as the python path checker to determine the correct md5 command. This improves the previous technique.
This commit is contained in:
parent
dce16261eb
commit
167cfd866e
@ -60,14 +60,22 @@ SSH_SHIM = '''/bin/sh << 'EOF'
|
||||
done
|
||||
SALT=/tmp/.salt/salt-call
|
||||
|
||||
if ( ( [ ! -f {{2}} ] ) && ([ {{2}} == 'md5' ]) )
|
||||
if [ {{2}} == 'md5' ]
|
||||
then
|
||||
SUMCHECK='md5'
|
||||
for md5_candidate in \\
|
||||
md5sum \\
|
||||
md5 ;
|
||||
do
|
||||
if [ $(which $md5_candidate 2>/dev/null) ]
|
||||
then
|
||||
SUMCHECK=$(which $md5_candidate)
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
SUMCHECK={{2}}sum
|
||||
SUMCHECK={{2}}
|
||||
fi
|
||||
|
||||
|
||||
if [ -f $SALT ]
|
||||
then
|
||||
if [ $(cat /tmp/.salt/version) != {0} ]
|
||||
|
Loading…
Reference in New Issue
Block a user