diff options
32 files changed, 0 insertions, 225 deletions
diff --git a/Makefile.am b/Makefile.am index 3ab2332..2b5950c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,8 +22,6 @@ bin_SCRIPTS += scripts/vyatta-show-interfaces.pl bin_SCRIPTS += scripts/vyatta-show-dhclient.pl bin_SCRIPTS += scripts/vyatta-show-dmi bin_SCRIPTS += scripts/vyatta-show-bonding.pl -bin_SCRIPTS += scripts/vyatta-cpu-summary.pl -bin_SCRIPTS += scripts/yesno bin_SCRIPTS += scripts/vyatta-gettime.pl bin_SCRIPTS += scripts/show-dhcp-leases.pl bin_SCRIPTS += scripts/vyatta-boot-image.pl @@ -41,7 +39,6 @@ bin_SCRIPTS += scripts/vyatta-monitor-background bin_SCRIPTS += scripts/vyatta-monitor-background-stop bin_SCRIPTS += scripts/vyatta-monitor-check-rule-log bin_SCRIPTS += scripts/vyos-strip-config.pl -bin_SCRIPTS += scripts/ssh-server-key sbin_SCRIPTS = scripts/dhcpv6-client-show-leases.pl sbin_SCRIPTS += scripts/vyatta-image-tools.pl 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 - - - diff --git a/templates/format/disk/node.def b/templates/format/disk/node.def deleted file mode 100644 index 97df9b7..0000000 --- a/templates/format/disk/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Format a disk drive diff --git a/templates/format/disk/node.tag/like/node.def b/templates/format/disk/node.tag/like/node.def deleted file mode 100644 index c4a5126..0000000 --- a/templates/format/disk/node.tag/like/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Format this disk the same as another disk diff --git a/templates/format/disk/node.tag/like/node.tag/node.def b/templates/format/disk/node.tag/like/node.tag/node.def deleted file mode 100644 index a98cbcc..0000000 --- a/templates/format/disk/node.tag/like/node.tag/node.def +++ /dev/null @@ -1,61 +0,0 @@ -help: Name of disk drive to partition it like - -allowed: - local -a disks ; - proto_disk=${COMP_WORDS[2]} - disks=`cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' | egrep -v "[0-9]"` - disks=`echo $disks | sed -e s/$proto_disk//g` - echo -n $disks - -run: - proto_disk=$5 - format_disk=$3 - backup_dir=/var/tmp - eligible_format_disks=`cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' | egrep -v "[0-9]"` - eligible_proto_disks=`echo $eligible_format_disks | sed -e s/$format_disk//g` - proto_eligible=`echo $eligible_proto_disks | grep $proto_disk` - format_eligible=`echo $eligible_format_disks | grep $format_disk` - busy_check=`sudo /sbin/sfdisk -R /dev/$format_disk 2>&1` - - if [ $proto_disk = $format_disk ]; then - echo "The two disk drives must be different." - elif [ ! -b /dev/$proto_disk ]; then - echo "Device /dev/$proto_disk does not exist" - elif [ ! -b /dev/$format_disk ]; then - echo "Device /dev/$format_disk does not exist" - elif [ -z "$format_eligible" ]; then - echo "Device $format_disk can not be formatted" - elif [ -z "$proto_eligible" ]; then - echo "Device $proto_disk can not be used as a prototype for $format_disk" - elif [ -n "$busy_check" ]; then - echo "Disk device $format_disk is busy. Can't format it now." - elif [ ! -r /dev/$format_disk ]; then - echo "Must be admin or root to format disk" - else - echo "This will re-format disk $format_disk so that it has the same disk" - echo "partion sizes and offsets as $proto_disk. This will not copy" - echo "data from $proto_disk to $format_disk. But this will erase all" - echo "data on $format_disk." - echo - echo -n "Do you wish to proceed (yes, NO)? " - read response - if [ "$response" = "yes" ]; then - echo "OK. Re-formating disk drive $format_disk..." - echo "Making backup copy of partitions..." - sudo /sbin/sfdisk -d /dev/$format_disk > $backup_dir/backup_$format_disk.`date +%F-%R` - sleep 1 - partitions=`cat /proc/partitions | grep $format_disk'[0-9]' | awk '{ print $4 }' | sed 's/[a-z]//g'` - if [ -n "$partitions" ]; then - echo -n "Deleting old partitions..." - for part in $partitions ; do - sudo /sbin/parted /dev/$format_disk rm $part - done - echo "" - fi - echo "Creating new partitions on $format_disk based on $proto_disk..." - sudo /sbin/sfdisk -d /dev/$proto_disk | sudo /sbin/sfdisk --force /dev/$format_disk - echo "Done." - else - echo "OK. Disk drive $format_drive will not be re-formated." - fi - fi diff --git a/templates/format/disk/node.tag/node.def b/templates/format/disk/node.tag/node.def deleted file mode 100644 index 2b77c5b..0000000 --- a/templates/format/disk/node.tag/node.def +++ /dev/null @@ -1,6 +0,0 @@ -help: Disk drive name - -allowed: - local -a array ; - array=`cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' | egrep -v "[0-9]"` - echo -n $array diff --git a/templates/format/node.def b/templates/format/node.def deleted file mode 100644 index 5775951..0000000 --- a/templates/format/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Format a device diff --git a/templates/generate/ssh-server-key/node.def b/templates/generate/ssh-server-key/node.def deleted file mode 100644 index a31a734..0000000 --- a/templates/generate/ssh-server-key/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: Regenerate the host SSH keys and restart the SSH server -run: ${vyatta_bindir}/ssh-server-key diff --git a/templates/monitor/bandwidth-test/accept/node.def b/templates/monitor/bandwidth-test/accept/node.def deleted file mode 100644 index 1dc5335..0000000 --- a/templates/monitor/bandwidth-test/accept/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: Wait for bandwidth test connections (port TCP/5001) -run: iperf -s diff --git a/templates/monitor/bandwidth-test/initiate/node.def b/templates/monitor/bandwidth-test/initiate/node.def deleted file mode 100644 index af8c1bd..0000000 --- a/templates/monitor/bandwidth-test/initiate/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Initiate a bandwidth test diff --git a/templates/monitor/bandwidth-test/initiate/node.tag/node.def b/templates/monitor/bandwidth-test/initiate/node.tag/node.def deleted file mode 100644 index 3d047dd..0000000 --- a/templates/monitor/bandwidth-test/initiate/node.tag/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Initiate a bandwidth test to specified host (port TCP/5001) -allowed: echo '<hostname> <x.x.x.x> <h:h:h:h:h:h:h:h>' -run: iperf -c $4 diff --git a/templates/monitor/bandwidth-test/node.def b/templates/monitor/bandwidth-test/node.def deleted file mode 100644 index c83cb4f..0000000 --- a/templates/monitor/bandwidth-test/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Initiate or wait for bandwidth test diff --git a/templates/set/console/keymap/node.def b/templates/set/console/keymap/node.def deleted file mode 100644 index 5ab2f24..0000000 --- a/templates/set/console/keymap/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Reconfigure console keyboard layout -run: sudo dpkg-reconfigure -f dialog keyboard-configuration - sudo /etc/init.d/keyboard-setup restart diff --git a/templates/set/console/node.def b/templates/set/console/node.def deleted file mode 100644 index 29bae4d..0000000 --- a/templates/set/console/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Control console behaviors diff --git a/templates/set/node.tag/node.def b/templates/set/node.tag/node.def deleted file mode 100644 index 908d521..0000000 --- a/templates/set/node.tag/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Bash builtin set command -allowed: echo -n '<OPTION>' -run: builtin $* diff --git a/templates/set/terminal/key/node.def b/templates/set/terminal/key/node.def deleted file mode 100644 index be435af..0000000 --- a/templates/set/terminal/key/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Set key behaviors diff --git a/templates/set/terminal/key/query-help/node.def b/templates/set/terminal/key/query-help/node.def deleted file mode 100644 index c15f556..0000000 --- a/templates/set/terminal/key/query-help/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Enable/disable getting help using question mark diff --git a/templates/set/terminal/key/query-help/node.tag/node.def b/templates/set/terminal/key/query-help/node.tag/node.def deleted file mode 100644 index 8ea9fbf..0000000 --- a/templates/set/terminal/key/query-help/node.tag/node.def +++ /dev/null @@ -1,10 +0,0 @@ -help: Enable/disable getting help using question mark (default enabled) -allowed: echo -n 'enable' 'disable' -run: if [ "$5" == 'disable' ]; then - sed -i "/^bind '\"?\": .* # vyatta key binding$/d" $HOME/.bashrc - echo "bind '\"?\": self-insert' # vyatta key binding" >> $HOME/.bashrc - bind '"?": self-insert' - else - sed -i "/^bind '\"?\": .* # vyatta key binding$/d" $HOME/.bashrc - bind '"?": possible-completions' - fi diff --git a/templates/set/terminal/length/node.def b/templates/set/terminal/length/node.def deleted file mode 100644 index 3e24898..0000000 --- a/templates/set/terminal/length/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Set terminal rows diff --git a/templates/set/terminal/length/node.tag/node.def b/templates/set/terminal/length/node.tag/node.def deleted file mode 100644 index 42a0726..0000000 --- a/templates/set/terminal/length/node.tag/node.def +++ /dev/null @@ -1,7 +0,0 @@ -help: Set terminal to given number of rows (0 disables paging) -allowed: echo -n '<NUMBER>' -run: if [ "$4" -eq 0 ] ; then - VYATTA_PAGER=cat - else - stty rows $4 - fi diff --git a/templates/set/terminal/node.def b/templates/set/terminal/node.def deleted file mode 100644 index cdc1793..0000000 --- a/templates/set/terminal/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Control terminal behaviors diff --git a/templates/set/terminal/pager/node.def b/templates/set/terminal/pager/node.def deleted file mode 100644 index d2d414d..0000000 --- a/templates/set/terminal/pager/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: Set to use default pager (less) -run: VYATTA_PAGER=$_vyatta_default_pager diff --git a/templates/set/terminal/pager/node.tag/node.def b/templates/set/terminal/pager/node.tag/node.def deleted file mode 100644 index dd5a3de..0000000 --- a/templates/set/terminal/pager/node.tag/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Set terminal pager -allowed: echo -n '<PROGRAM>' -run: VYATTA_PAGER=$4 diff --git a/templates/set/terminal/width/node.def b/templates/set/terminal/width/node.def deleted file mode 100644 index ddbc07d..0000000 --- a/templates/set/terminal/width/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Set terminal columns diff --git a/templates/set/terminal/width/node.tag/node.def b/templates/set/terminal/width/node.tag/node.def deleted file mode 100644 index 792f34a..0000000 --- a/templates/set/terminal/width/node.tag/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Set terminal to given number of columns -allowed: echo -n '<NUMBER>' -run: stty columns $4 diff --git a/templates/show/history/brief/node.def b/templates/show/history/brief/node.def deleted file mode 100644 index 92c76ca..0000000 --- a/templates/show/history/brief/node.def +++ /dev/null @@ -1,5 +0,0 @@ -help: recent command history -run: HISTTIMEFORMAT='%FT%T%z ' - HISTFILE="$HOME/.bash_history" - \set -o history - history 20 diff --git a/templates/show/history/node.def b/templates/show/history/node.def deleted file mode 100644 index c1487eb..0000000 --- a/templates/show/history/node.def +++ /dev/null @@ -1,5 +0,0 @@ -help: show command history -run: HISTTIMEFORMAT='%FT%T%z ' - HISTFILE="$HOME/.bash_history" - \set -o history - history diff --git a/templates/show/history/node.tag/node.def b/templates/show/history/node.tag/node.def deleted file mode 100644 index 2075cde..0000000 --- a/templates/show/history/node.tag/node.def +++ /dev/null @@ -1,6 +0,0 @@ -help: Display last N commands in history -allowed: echo -n '<NUMBER>' -run: HISTTIMEFORMAT='%FT%T%z ' - HISTFILE="$HOME/.bash_history" - \set -o history - history $3 diff --git a/templates/show/host/date/node.def b/templates/show/host/date/node.def deleted file mode 100644 index 6ea4383..0000000 --- a/templates/show/host/date/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: Show host current date -run: /bin/date diff --git a/templates/show/host/os/node.def b/templates/show/host/os/node.def deleted file mode 100644 index 1cfe2ec..0000000 --- a/templates/show/host/os/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: Show host operating system details -run: /bin/uname -a |