3 # Gross hack to create a version of /usr/bin/digest that doesn't need
4 # to have all of the crypto framework libraries. sha1sum is available,
5 # and we can use it. This is needed for bootadm(1M).
7 # FOR NOW, assume we're only ever going to be invoked by create_ramdisk,
8 # which uses "digest -a sha1 <one-filename>".
11 echo "Usage:" > /dev
/stderr
12 echo " digest -l | [-v] -a <algorithm> [file...]" > /dev
/stderr
16 if [[ $1 != "-a" ||
$2 != "sha1" ]]; then
20 sha1sum $3 |
awk '{print $1}'