Last change
on this file was 988, checked in by Silvan Scherrer, 9 years ago |
Samba Server: update vendor to version 4.4.3
|
File size:
390 bytes
|
Rev | Line | |
---|
[988] | 1 | #!/bin/sh
|
---|
| 2 | #
|
---|
| 3 |
|
---|
| 4 | if [ $# -lt 2 ]; then
|
---|
| 5 | echo "$0: <low> <high>"
|
---|
| 6 | exit 1;
|
---|
| 7 | fi
|
---|
| 8 |
|
---|
| 9 | l=$1
|
---|
| 10 | h=$2
|
---|
| 11 |
|
---|
| 12 | s=$(expr $h - $l)
|
---|
| 13 |
|
---|
| 14 | r=$(head --bytes=2 /dev/urandom | od -l | head -n 1 | sed -e 's/^[^ ]* *//')
|
---|
| 15 |
|
---|
| 16 | v=$(expr $r % $s)
|
---|
| 17 | d=$(expr $l + $v)
|
---|
| 18 |
|
---|
| 19 | if test "x${AUTOBUILD_RANDOM_SLEEP_OVERRIDE}" != "x" ; then
|
---|
| 20 | d="${AUTOBUILD_RANDOM_SLEEP_OVERRIDE}"
|
---|
| 21 | fi
|
---|
| 22 |
|
---|
| 23 | echo "$0: sleep $d ... start"
|
---|
| 24 | sleep $d
|
---|
| 25 | echo "$0: sleep $d ... end"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.