diff options
author | Daniil Baturin <daniil@vyos.io> | 2021-01-04 22:54:15 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 22:54:15 +0700 |
commit | cc36c93479d954ac6ab5454c2d25e86edbc57c61 (patch) | |
tree | e3252f1937a988596607ac542477d388b06aa2ad /scripts/install/install-image-existing | |
parent | 8964d55045f57218d2f05770d9f954e620a81974 (diff) | |
parent | d0063d8c9972b673a00b4cea87cc22269e675415 (diff) | |
download | vyatta-cfg-system-cc36c93479d954ac6ab5454c2d25e86edbc57c61.tar.gz vyatta-cfg-system-cc36c93479d954ac6ab5454c2d25e86edbc57c61.zip |
Merge pull request #135 from jestabro/T3161
migration: T3161: move XorpConfigParser.pm; remove ConfigLoad.pm
Diffstat (limited to 'scripts/install/install-image-existing')
-rwxr-xr-x | scripts/install/install-image-existing | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index 62b7f80e..0acfcb1f 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -36,29 +36,6 @@ get_grub_index () { fi } -# Check if installing on AWS EC2 AMI -is_amazon_ec2_ami () { - /opt/vyatta/sbin/ec2-check.pl - if [ $? != 0 ]; then - return 1 - fi - - ami_id_url=http://169.254.169.254/latest/meta-data/ami-id - - ami_id=$(/usr/bin/curl --silent "$ami_id_url") - if [ -n "$ami_id" ]; then - echo "Installing on VyOS AMI" - - # Create init script links for /etc/init.d/ec2-vyos-init - chroot $INST_ROOT update-rc.d ec2-vyos-init defaults &>/dev/null - - # Dijkstra, forgive us! - return 0 - else - return 1 - fi -} - if [ $(id -u) != 0 ]; then echo "Image installation requires root privileges!" exit 1 @@ -287,14 +264,6 @@ if [ -e "$DEF_GRUB" ]; then mv $BOOT_DIR/%%default_image $BOOT_DIR/%%default_image.orig ln -s $NEWNAME $BOOT_DIR/%%default_image fi - - # Modify grub.cfg for AWS EC2 AMI - if is_amazon_ec2_ami; then - sed -i "/menuentry \"VyOS $NEWNAME (Serial/{N;N;N;N;d;}" $BOOT_DIR/grub/grub.cfg - sed -i "/menuentry \"Lost password change $NEWNAME/{N;N;N;N;d;}" $BOOT_DIR/grub/grub.cfg - sed -i "s/VyOS $NEWNAME (KVM console)/VyOS AMI (HVM) $NEWNAME/" $BOOT_DIR/grub/grub.cfg - sed -i "s/$NEWNAME console=ttyS0.*/$NEWNAME console=ttyS0/" $BOOT_DIR/grub/grub.cfg - fi fi logger -p local3.warning -t "SystemImage" "System Image $NEWNAME has been added and made the default boot image" |