diff options
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 + + |