diff options
| author | Roberto Berto <463349+robertoberto@users.noreply.github.com> | 2024-05-15 03:31:01 +0000 |
|---|---|---|
| committer | Roberto Berto <463349+robertoberto@users.noreply.github.com> | 2024-05-15 03:31:01 +0000 |
| commit | b1b9151865275b52647e784c9a8f201e3f090a30 (patch) | |
| tree | 3561c1523eb6dec0b2a6104a66451adec0a1fc8c /scripts | |
| parent | 769d3a05284392068a3ae56542af64e786fda74e (diff) | |
| download | packer-vyos-b1b9151865275b52647e784c9a8f201e3f090a30.tar.gz packer-vyos-b1b9151865275b52647e784c9a8f201e3f090a30.zip | |
Improvements for v0.1
- Makefile now clone build1 to build2 to stop break build1 image if build2 fail
- Fix README.md github md syntax
- grub-serial.sh: bool should be integer and fixed grub default sed
- Improved build workflow between build1 to build2
- qmeuargs not create sparse files +detect-zeroes=on -discard=ignore
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/vyos/cleanup.sh | 2 | ||||
| -rw-r--r-- | scripts/vyos/configure.sh | 2 | ||||
| -rw-r--r-- | scripts/vyos/grub-serial.sh | 12 |
3 files changed, 13 insertions, 3 deletions
diff --git a/scripts/vyos/cleanup.sh b/scripts/vyos/cleanup.sh index 6ccf753..f1586f7 100644 --- a/scripts/vyos/cleanup.sh +++ b/scripts/vyos/cleanup.sh @@ -13,7 +13,7 @@ cat <<EOF > /home/vyos/cleanup-vyos.sh #!/bin/vbash source /opt/vyatta/etc/functions/script-template configure -set system host-name 'test' +set system host-name 'vyosbuild' commit save exit diff --git a/scripts/vyos/configure.sh b/scripts/vyos/configure.sh index 2628959..8d328ee 100644 --- a/scripts/vyos/configure.sh +++ b/scripts/vyos/configure.sh @@ -13,7 +13,7 @@ cat <<EOF > /home/vyos/configure-vyos.sh #!/bin/vbash source /opt/vyatta/etc/functions/script-template configure -set system host-name 'test' +set system host-name 'vyoshost' commit save exit diff --git a/scripts/vyos/grub-serial.sh b/scripts/vyos/grub-serial.sh index b72b1a8..5beb889 100644 --- a/scripts/vyos/grub-serial.sh +++ b/scripts/vyos/grub-serial.sh @@ -3,6 +3,7 @@ set -e set -x +#GRUB_SERIAL=1 if [[ "${GRUB_SERIAL}" -ne 1 ]]; then echo "$0 - info: grub will keep default=0 (kvm). to use serial add to .env: GRUB_SERIAL=1" exit 0 @@ -12,4 +13,13 @@ GRUB_CFG="/boot/grub/grub.cfg" GRUB_DEFAULT="/etc/default/grub" sed -i 's/^set default=.*/set default=1/' $GRUB_CFG -sed -i 's/^set default=.*/set default=1/' $GRUB_DEFAULT + +if grep -q "^GRUB_DEFAULT=" $GRUB_DEFAULT; then + sed -i 's/^GRUB_DEFAULT=.*/GRUB_DEFAULT=1/' $GRUB_DEFAULT +else + echo "GRUB_DEFAULT=1" >> $GRUB_DEFAULT +fi + +# update-grub + + |
