From bf7e7d7db64bb7c8827cb176d2ac6b8dd06741fc Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 10 Dec 2012 01:35:11 +0100 Subject: changed random source --- retiolum/scripts/tinc_setup/new_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 94319bfd..049eeca5 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -254,7 +254,7 @@ $LOADER euer.krebsco.de/retiolum/hosts.tar.gz | tar zx -C $TEMPDIR/hosts/ #version 4 until check_ip_taken $IP4; do if [ $RAND4 -eq 1 ]; then - IP4="$SUBNET4.$((RANDOM%255)).$((RANDOM%255))" + IP4="$SUBNET4.$(( $(head /dev/urandom | tr -dc "123456789" | head -c3) %255)).$(( $(head /dev/urandom | tr -dc "123456789" | head -c3) %255))" else printf 'choose new ip: ' read IP4 @@ -360,7 +360,7 @@ else fi #write to irc-channel -NICK="${HOSTN}_$((RANDOM%666))" +NICK="${HOSTN}_$(head /dev/urandom | tr -dc "0123456789" | head -c3)" ( echo "NICK $NICK"; echo "USER $NICK $IRCSERVER bla : $NICK"; -- cgit v1.2.3