From 1e912c8e385c94baff8e54b76532763ee161d575 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Fri, 30 Apr 2010 15:51:31 -0700 Subject: Added an op-mode command to rename a system image. Also added an op-mode command to display the Vyatta version strings along with the names of the installed images. This is useful if you rename an image from its default name, which is its version string. --- templates/rename/system/image/node.def | 1 + templates/rename/system/image/node.tag/node.def | 6 ++++++ templates/rename/system/image/node.tag/node.tag/node.def | 7 +++++++ templates/rename/system/node.def | 1 + 4 files changed, 15 insertions(+) create mode 100644 templates/rename/system/image/node.def create mode 100644 templates/rename/system/image/node.tag/node.def create mode 100644 templates/rename/system/image/node.tag/node.tag/node.def create mode 100644 templates/rename/system/node.def (limited to 'templates/rename/system') diff --git a/templates/rename/system/image/node.def b/templates/rename/system/image/node.def new file mode 100644 index 0000000..00e9c81 --- /dev/null +++ b/templates/rename/system/image/node.def @@ -0,0 +1 @@ +help: Re-name a system image. diff --git a/templates/rename/system/image/node.tag/node.def b/templates/rename/system/image/node.tag/node.def new file mode 100644 index 0000000..eb25def --- /dev/null +++ b/templates/rename/system/image/node.tag/node.def @@ -0,0 +1,6 @@ +help: System image to rename. + +allowed: + local -a images ; + images=`/opt/vyatta/bin/vyatta-boot-image.pl --list` + echo -n $images diff --git a/templates/rename/system/image/node.tag/node.tag/node.def b/templates/rename/system/image/node.tag/node.tag/node.def new file mode 100644 index 0000000..1f94c57 --- /dev/null +++ b/templates/rename/system/image/node.tag/node.tag/node.def @@ -0,0 +1,7 @@ +help: New name for system image. + +run: + old=$4 + new=$5 + sudo /opt/vyatta/bin/rename-image.pl --old_name $old --new_name $new + diff --git a/templates/rename/system/node.def b/templates/rename/system/node.def new file mode 100644 index 0000000..1d86fc2 --- /dev/null +++ b/templates/rename/system/node.def @@ -0,0 +1 @@ +help: Re-name a system object. -- cgit v1.2.3