diff options
author | Dmytro Aleksandrov <alkersan@gmail.com> | 2019-08-30 18:43:01 +0300 |
---|---|---|
committer | Dmytro Aleksandrov <alkersan@gmail.com> | 2019-08-30 18:43:01 +0300 |
commit | eea95c8980a290d753777da173935f39f1589b9b (patch) | |
tree | e2d8f866b38be9dbe35973bb632df8e7a90d256c /templates | |
parent | 8efa92beebfbeb70dd834b568365eda161271d38 (diff) | |
download | vyatta-op-eea95c8980a290d753777da173935f39f1589b9b.tar.gz vyatta-op-eea95c8980a290d753777da173935f39f1589b9b.zip |
T1621 remove misc ops after python/xml rewrite
Diffstat (limited to 'templates')
28 files changed, 0 insertions, 136 deletions
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 |