summaryrefslogtreecommitdiff
path: root/scripts/ec2-check.pl
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2020-12-30 10:40:14 -0600
committerJohn Estabrook <jestabro@vyos.io>2020-12-30 11:56:39 -0600
commitd0063d8c9972b673a00b4cea87cc22269e675415 (patch)
treee3252f1937a988596607ac542477d388b06aa2ad /scripts/ec2-check.pl
parent4bc5dabe46fffc2edd5bdbda27f020ed1a2bfc33 (diff)
downloadvyatta-cfg-system-d0063d8c9972b673a00b4cea87cc22269e675415.tar.gz
vyatta-cfg-system-d0063d8c9972b673a00b4cea87cc22269e675415.zip
migration: T3161: remove scripts ec2-vyos-init, ec2-check.pl
These scripts have been superseded by the cloud-init tools, and contain legacy references to XorpConfigParser.pm (via vyatta-cfg/scripts/vyatta-load-config.pl, via ConfigLoad.pm), which one would like to retire.
Diffstat (limited to 'scripts/ec2-check.pl')
-rwxr-xr-xscripts/ec2-check.pl40
1 files changed, 0 insertions, 40 deletions
diff --git a/scripts/ec2-check.pl b/scripts/ec2-check.pl
deleted file mode 100755
index 03448ff5..00000000
--- a/scripts/ec2-check.pl
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env perl
-# **** License ****
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 or later as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# This code was originally developed by VyOS Development Group
-# All Rights Reserved.
-#
-# Author: Daniil Baturin <daniil@baturin.org>
-# Description: Check if we are running on an EC2 instance.
-# If both system UUID and system serial number start with "EC2",
-# most likely we are.
-#
-# **** End License ****
-
-
-use strict;
-use warnings;
-
-my $DMIDECODE = "/usr/sbin/dmidecode";
-
-my $UUID = `$DMIDECODE -s system-uuid`;
-my $SN = `$DMIDECODE -s system-serial-number`;
-
-if( ($UUID =~ /^ec2.*/i) &&
- ($SN =~ /^ec2.*/i) )
-{
- exit(0);
-}
-else
-{
- exit(1);
-}
-