blob: 262895972d643c5f3aac3ed2dcea578c8a48edaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
set -e
set -x
# export DEBIAN_FRONTEND=noninteractive
# delete interfaces ethernet eth0 address
# delete interfaces ethernet eth0 hw-id
# delete system name-server
cat <<EOF > /home/vyos/configure-vyos.sh
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
configure
set system host-name 'test'
commit
save
exit
EOF
chmod 0700 /home/vyos/configure-vyos.sh
chown vyos:users /home/vyos/configure-vyos.sh
su - vyos -c "/home/vyos/configure-vyos.sh"
|