summaryrefslogtreecommitdiff
path: root/scripts/vyos/configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vyos/configure.sh')
-rw-r--r--scripts/vyos/configure.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/vyos/configure.sh b/scripts/vyos/configure.sh
new file mode 100644
index 0000000..f52c336
--- /dev/null
+++ b/scripts/vyos/configure.sh
@@ -0,0 +1,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