summaryrefslogtreecommitdiff
path: root/scripts/vyos/configure.sh
blob: 8d328ee53532cff5281b890f5e264958cc2caaf8 (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"