If you execute install.sh on a Lion or Snow Leopard you get an md5sum failed:
###
### Checking archive files for existence, readability and integrity.
automysqlbackup ... exists and is readable ... md5sum failed :(
###
I copied also from a Linux server over scp to my macs and I had always md5sum faild.
System Version: Mac OS X 10.6.8 (10K549)
Kernel Version: Darwin 10.8.0
Hi, I need more information.
Please add the output of:
grep 'precheck_files=( automysqlbackup' install.sh
md5sum automysqlbackup
Please also test the latter on the Linux server, if possible. There isn't much room for possible errors here, since I just checked the files in our archive - they are just fine.
Perhaps you can modify one line of install.sh
if echo "${precheck_files[$((2*$i+1))]} ${precheck_files[$((2*$i))]}" | md5sum --check >/dev/null 2>&1; then
into
if echo "${precheck_files[$((2*$i+1))]} ${precheck_files[$((2*$i))]}" | md5sum --check; then
then run it again and see if you get an error from md5sum.
Also an md5sum --help output would be good to see, if the --check routine doesn't exist on your system.
I search a litte bit and found out that Mac OS X didn’t have the md5sum installed by default. Only md5 is installed where you can create an md5 hash and md5 hash noch --check routine.
Well I'll just add a check in the install.sh to see if md5sum is there or not. Could you just clarify: Is md5sum --check available?
Okay, I'm going to close this but leave it open for comment posting. Please be so kind and answer my last question.
md5sum --check
-bash: md5sum: command not found
Interesting post that may help here: http://raamdev.com/2008/howto-install-md5sum-sha1sum-on-mac-os-x/ It's a kludge, however, it gives some direction. There is no equivalent for the "md5sum --check" or is there?
I just took another look at this and there seems to be "openssl md5 file_name" available on osx. If one would replace
if echo "${precheck_files[$((2*$i+1))]} ${precheck_files[$((2*$i))]}" | md5sum --check >/dev/null 2>&1; then
printf "md5sum okay :)\n"
else
printf "md5sum failed :(\n"
exit 1
fi
with
md5_sum=$(openssl md5 "${precheck_files[$((2*$i))]}")
md5_sum=${md5_sum##*= }
if [[ "${precheck_files[$((2*$i+1))]}" = "${md5_sum}" ]]; then
printf "md5sum okay :)\n"
else
printf "md5sum failed :(\n"
exit 1
fi
in the install.sh script, this should work.
However this relies on the fact, that the output openssl produces is of the form
MD5(path/to/file)= 234890234890
where there is a = followed by a single space before the actual md5 sum.
If people using osx would test this and come back to me with the result, i could make changes for the next version.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
It seems you just need to replace
md5sum --check
with
md5 -r
For when running under MacOSX.
Cheers,
Brooke
I had the same problem on pair.com running install.sh under ssh (under Linux @ pair). So I tried your mod:
md5_sum=$(openssl md5 "${precheck_files[$((2*$i))]}")
md5_sum=${md5_sum##*= }
if [[ "${precheck_files[$((2*$i+1))]}" = "${md5_sum}" ]]; then
printf "md5sum okay :)\n"
else
printf "md5sum failed :(\n"
exit 1
fi
And that worked just fine. I did find this Apache note about md5 issues that you may not be aware of:
http://ant.apache.org/manual/Tasks/checksum.html
I had the same problem on pair.com running install.sh under ssh (under Linux @ pair). So I tried your mod:
md5_sum=$(openssl md5 "${precheck_files[$((2*$i))]}")
md5_sum=${md5_sum##*= }
if [[ "${precheck_files[$((2*$i+1))]}" = "${md5_sum}" ]]; then
printf "md5sum okay :)\n"
else
printf "md5sum failed :(\n"
exit 1
fi
And that worked just fine. I did find a reference to Apache comments on problems with md5 here:
http://ant.apache.org/manual/Tasks/checksum.html