diff options
author | Kim Hagen <kim.sidney@gmail.com> | 2019-04-15 16:30:35 +0200 |
---|---|---|
committer | Kim Hagen <kim.sidney@gmail.com> | 2019-04-15 16:34:41 +0200 |
commit | 7bf85ec35c9ccde62b066fb410b17a2526c150f6 (patch) | |
tree | 1ccb75633c52534a5ffc45cc8941fcab5776b73e /tools | |
parent | d28d36ac3a12e4bb9ce56767d50267801cea650b (diff) | |
download | vyos-build-7bf85ec35c9ccde62b066fb410b17a2526c150f6.tar.gz vyos-build-7bf85ec35c9ccde62b066fb410b17a2526c150f6.zip |
add debug build for GCE
Conflicts:
Makefile
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/cloud-init/GCE/99-debug-user.chroot | 17 | ||||
-rw-r--r-- | tools/cloud-init/GCE/config.boot.default-debug | 41 |
2 files changed, 58 insertions, 0 deletions
diff --git a/tools/cloud-init/GCE/99-debug-user.chroot b/tools/cloud-init/GCE/99-debug-user.chroot new file mode 100755 index 00000000..7b72f898 --- /dev/null +++ b/tools/cloud-init/GCE/99-debug-user.chroot @@ -0,0 +1,17 @@ +#!/bin/bash +# Script to add a user to Linux system +if [ $(id -u) -eq 0 ]; then + egrep "^debuguser" /etc/passwd >/dev/null + if [ $? -eq 0 ]; then + echo "$username exists!" + exit 1 + else + pass=$(perl -e 'print crypt($ARGV[0], "password")' dKD3UKamS3MQ) + useradd -m -p $pass debuguser + usermod -aG sudo debuguser + [ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!" + fi +else + echo "Only root may add a user to the system" + exit 2 +fi diff --git a/tools/cloud-init/GCE/config.boot.default-debug b/tools/cloud-init/GCE/config.boot.default-debug new file mode 100644 index 00000000..9514e893 --- /dev/null +++ b/tools/cloud-init/GCE/config.boot.default-debug @@ -0,0 +1,41 @@ +interfaces { + ethernet eth0 { + address dhcp + } +} +service { + ssh { + port 8022 + client-keepalive-interval 180 + } +} +system { + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS0 { + speed 38400 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} |