#!/bin/bash ##### # Preparazione per installazione laboratorio # File release: 20210729 if [ -z "$1" ]; then echo -n "Laboratorio (i=Irnerio, nav=Navile) ? " read L else L=$1 fi if [ -z "$2" ]; then echo -n "Numero macchina ? " read N else N=$2 fi sudo sed -i~ "s/LAB-GEN/${L}-${N}/" /etc/host{s,name} sudo nmcli c m "Connessione via cavo 1" 802-3.wake-on-lan magic sudo dpkg-reconfigure openssh-server sudo apt update wget http://apps.difa.unibo.it/wiki/_export/code/script?codeblock=1 -O /home/tecnici/inst.sh sed -i~ "s/=diego.zuccato/=$myADUser/" /home/tecnici/inst.sh sudo shutdown -r now