From b9dfc424e1a5b6041df66cb63aa0d842e4b8a582 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date: Thu, 30 Oct 2008 15:16:39 -0700
Subject: Save/restore command history in configure

Need to save/restore command history when going into configure mode.
---
 templates/configure/node.def    | 6 +++++-
 templates/show/history/node.def | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/templates/configure/node.def b/templates/configure/node.def
index 5d30510..5b349e8 100644
--- a/templates/configure/node.def
+++ b/templates/configure/node.def
@@ -1,3 +1,7 @@
 help: Enter configure mode
-run: export _OFR_CONFIGURE=ok; newgrp vyattacfg; unset _OFR_CONFIGURE
+run: history -w
+     export _OFR_CONFIGURE=ok
+     newgrp vyattacfg
+     unset _OFR_CONFIGURE
      _vyatta_op_do_key_bindings
+     history -r
diff --git a/templates/show/history/node.def b/templates/show/history/node.def
index 682122a..787ebd9 100644
--- a/templates/show/history/node.def
+++ b/templates/show/history/node.def
@@ -1,2 +1,2 @@
 help: show command history
-run: HISTTIMEFORMAT='%FT%T%z ' history
+run: history
-- 
cgit v1.2.3