mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
add debug build for GCE
This commit is contained in:
parent
812c2aa56d
commit
401165bc85
13
Makefile
13
Makefile
@ -106,6 +106,19 @@ GCE: clean prepare
|
||||
cd $(build_dir)
|
||||
@../scripts/build-GCE-image
|
||||
|
||||
.PHONY: GCE-debug
|
||||
.ONESHELL:
|
||||
GCE-debug: clean prepare
|
||||
@set -e
|
||||
@echo "It's not like I'm building this specially for you or anything!"
|
||||
mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d
|
||||
cp tools/cloud-init/GCE/99-debug-user.chroot build/config/hooks/live/
|
||||
cp tools/cloud-init/GCE/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/
|
||||
cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/
|
||||
cp -f tools/cloud-init/GCE/config.boot.default-debug build/config/includes.chroot/opt/vyatta/etc/config.boot.default
|
||||
cd $(build_dir)
|
||||
@../scripts/build-GCE-image
|
||||
|
||||
.PHONY: AWS
|
||||
.ONESHELL:
|
||||
AWS: clean prepare
|
||||
|
||||
17
tools/cloud-init/GCE/99-debug-user.chroot
Executable file
17
tools/cloud-init/GCE/99-debug-user.chroot
Executable file
@ -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
|
||||
41
tools/cloud-init/GCE/config.boot.default-debug
Normal file
41
tools/cloud-init/GCE/config.boot.default-debug
Normal file
@ -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 {
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user