summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts/tinc_setup/new_install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'retiolum/scripts/tinc_setup/new_install.sh')
-rwxr-xr-xretiolum/scripts/tinc_setup/new_install.sh4
1 files changed, 2 insertions, 2 deletions
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";