diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-01 21:10:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-01 21:10:39 +0200 |
commit | 6c460809b650377d2803b433c75914d7b707592e (patch) | |
tree | 4b245e21369c40de3bf2119095abcf52bd38a6f3 /scripts | |
parent | 9ae04f290d6437001bd0cc1daa58e5c304b76e4c (diff) | |
parent | eea95c8980a290d753777da173935f39f1589b9b (diff) | |
download | vyatta-op-6c460809b650377d2803b433c75914d7b707592e.tar.gz vyatta-op-6c460809b650377d2803b433c75914d7b707592e.zip |
Merge pull request #27 from alkersan/T1621_misc_rewrites
T1621 remove misc ops after python/xml rewrite
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ssh-server-key | 14 | ||||
-rwxr-xr-x | scripts/vyatta-cpu-summary.pl | 41 | ||||
-rwxr-xr-x | scripts/yesno | 31 |
3 files changed, 0 insertions, 86 deletions
diff --git a/scripts/ssh-server-key b/scripts/ssh-server-key deleted file mode 100755 index 949d314..0000000 --- a/scripts/ssh-server-key +++ /dev/null @@ -1,14 +0,0 @@ -regen_host_keys () -{ - sudo /bin/rm -v /etc/ssh/ssh_host_* - sudo dpkg-reconfigure openssh-server - sudo /etc/init.d/ssh restart -} - -echo "Do you really want to remove the existing SSH host keys? " -${vyatta_bindir}/yesno - -if [ $? -eq 0 ] -then - regen_host_keys -fi diff --git a/scripts/vyatta-cpu-summary.pl b/scripts/vyatta-cpu-summary.pl deleted file mode 100755 index b3e0331..0000000 --- a/scripts/vyatta-cpu-summary.pl +++ /dev/null @@ -1,41 +0,0 @@ -#! /usr/bin/perl -# implement "show cpu-info" - -use strict; - -open my $cpuinfo, '<', '/proc/cpuinfo' - or die "Can't open /proc/cpuinfo : $!"; - -my %models; -my %packages; -my %cores; - -my %map = ( - 'model name' => \%models, - 'physical id' => \%packages, - 'core id' => \%cores -); - -my $cpu = 0; -while (<$cpuinfo>) { - chomp; - my ( $tag, $val ) = split /:/; - if ( !$tag ) { - ++$cpu; - next; - } - - $tag =~ s/\s+$//; - $val =~ s/^\s+//; - - my $ref = $map{$tag}; - $ref->{$val} = $cpu if ($ref); -} -close $cpuinfo; - -print "Processors ", $cpu, "\n"; -print "Packages ", scalar keys %packages, "\n" if (%packages); -print "Cores ", scalar keys %cores, "\n" if (%cores); - -# Handle any attempt to run different CPU models -print "Model ", join( " \n", keys %models ), "\n"; diff --git a/scripts/yesno b/scripts/yesno deleted file mode 100755 index 260a23c..0000000 --- a/scripts/yesno +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/bash -# Usage: yesno prompt... - -default= -if [ "$1" = "-y" ] -then default='y'; shift -elif [[ "$1" = "-n" ]]; then - default='n'; shift -fi - - -if [ $# -eq 0 ] -then prompt="yes or no: " -else prompt="$*" -fi - -while true -do - read -p "$prompt" || exit 1 - if [ -z "$REPLY" -a ! -z "$default" ] - then REPLY=$default - fi - case "$REPLY" in - y*|Y*) exit 0;; - n*|n*) exit 1;; - *) echo "Answer yes or no please";; - esac -done - - - |