Improve FreeBSD compatibility
This commit is contained in:
committed by
Tom Limoncelli
parent
3b0f0194a0
commit
0002c97878
@@ -192,7 +192,7 @@ become_bob
|
|||||||
# This users's default group:
|
# This users's default group:
|
||||||
DEFAULT_GID_NUM=$(id -g)
|
DEFAULT_GID_NUM=$(id -g)
|
||||||
# Pick a group that is not the default group:
|
# Pick a group that is not the default group:
|
||||||
TEST_GID_NUM=$(id -G | fmt -1 | grep -xv "$(id -u)" | grep -xv "$(id -g)" | head -1)
|
TEST_GID_NUM=$(id -G | fmt -1 | sort -rn | grep -xv "$(id -u)" | grep -xv "$(id -g)" | head -1)
|
||||||
echo "DEFAULT_GID_NUM=$DEFAULT_GID_NUM"
|
echo "DEFAULT_GID_NUM=$DEFAULT_GID_NUM"
|
||||||
echo "TEST_GID_NUM=$TEST_GID_NUM"
|
echo "TEST_GID_NUM=$TEST_GID_NUM"
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function PHASE() {
|
|||||||
function md5sum_file() {
|
function md5sum_file() {
|
||||||
# Portably generate the MD5 hash of file $1.
|
# Portably generate the MD5 hash of file $1.
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
Darwin )
|
Darwin | FreeBSD )
|
||||||
md5 -r "$1" | awk '{ print $1 }'
|
md5 -r "$1" | awk '{ print $1 }'
|
||||||
;;
|
;;
|
||||||
Linux )
|
Linux )
|
||||||
|
|||||||
Reference in New Issue
Block a user