diff options
| author | cassio <cassiopc@gmail.com> | 2018-08-29 16:04:26 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2018-08-29 16:04:26 +0000 |
| commit | c21e94055524755c5f773d8046fba0b501d3f6f4 (patch) | |
| tree | 4abdc265dc8bba2866c3cc1c35c0579af4652ed8 | |
| parent | 2f32485e4dccbd18fd0c20a18fec2e1284bf0e95 (diff) | |
| download | boca-c21e94055524755c5f773d8046fba0b501d3f6f4.tar.gz boca-c21e94055524755c5f773d8046fba0b501d3f6f4.zip | |
gen unique id
| -rwxr-xr-x | tools/boca-auth-runs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/boca-auth-runs b/tools/boca-auth-runs index 63bc6b3..488e65b 100755 --- a/tools/boca-auth-runs +++ b/tools/boca-auth-runs @@ -5,6 +5,14 @@ if [ "`id -u`" != "0" ]; then exit 1 fi +if [ ! -f "/root/.uid.txt" ]; then + touch /root/.uid.txt + head -c30 /dev/urandom > /root/.uid.tmp + dmidecode >>/root/.uid.tmp + blkid >>/root/.uid.tmp + sha256sum /root/.uid.tmp | cut -d' ' -f1 >/root/.uid.txt +fi + user="$1" if [ "$user" == "" ]; then echo "parameter user missing. Usage: $0 <user> [<optional-server-address>]" |