blob: f52c3367994f9fe83d89d548939b514a25c30d23 (
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 'vyoshost'
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"
rm -rf /home/vyos/configure-vyos.sh
|