You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1005 B
56 lines
1005 B
#!/usr/bin/env bash
|
|
|
|
DESC="Configuration de client."
|
|
|
|
run() {
|
|
|
|
. $VDN_PATH/bin/functions-scripts.sh
|
|
|
|
setErrorHandler
|
|
echoStart
|
|
|
|
name="client"
|
|
|
|
requireSshGuests $name
|
|
|
|
setHostname $name
|
|
|
|
cat << EOF | setHosts $name
|
|
127.0.0.1 localhost
|
|
|
|
$($VDN_PATH/bin/vdn-infos darkside PUBLIC_IP) darkside
|
|
$($VDN_PATH/bin/vdn-infos brightside PUBLIC_IP) brightside
|
|
192.168.2.1 passerelle
|
|
|
|
192.168.2.2 distributeur
|
|
192.168.2.3 client
|
|
192.168.2.4 comanche
|
|
192.168.3.2 appolo
|
|
192.168.3.3 castafiore
|
|
|
|
EOF
|
|
|
|
cat << EOF | setInterfaces $name
|
|
# This file describes the network interfaces available on your system
|
|
# and how to activate them. For more information, see interfaces(5).
|
|
|
|
# The loopback network interface
|
|
auto lo
|
|
iface lo inet loopback
|
|
|
|
auto eth0
|
|
iface eth0 inet static
|
|
address 192.168.2.3
|
|
netmask 255.255.255.0
|
|
gateway 192.168.2.1
|
|
EOF
|
|
|
|
vdn-ssh root@$name "ip addr flush eth0; systemctl restart networking"
|
|
|
|
unsetErrorHandler
|
|
echoDone
|
|
|
|
|
|
}
|
|
|