 # - auto installation of NSM possible from inside this client,
 # - auto log monitoring and doing an action once a pattern is found,
 
+proc curtime { } {
+  return [ timestamp -format "%Y/%m/%d %H:%M:%S"]
+}
 
 proc backuptimeproc { } {
   return [ timestamp -format "%Y%m%d_%H%M%S"]

    alias jtac_undebug_env='unset NS_PRINTER_LEVEL';\
    alias xdbViewEdit=/usr/netscreen/GuiSvr/utils/.xdbViewEdit.sh;\
    alias jtac_db_size='ls -l /var/netscreen/GuiSvr/xdb/data/ | sort -nk5';\
    unalias rm;unalias mv;unalias cp;\r"
  }
  expect "*#" {
    send "if \[ -f /home/admin/.info \]; then\
    echo;echo \"+++++++++++++++++++++++++++++++++++++++++++++++++++\";\

    send "DBXML_DIR=`ls -1 -t /usr/netscreen/GuiSvr/utils|grep dbxml| head -n 1`;\
    LD_LIBRARY_PATH=/usr/netscreen/GuiSvr/utils/\$DBXML_DIR/lib:\$LD_LIBRARY_PATH;\
    PATH=/usr/netscreen/GuiSvr/utils/\$DBXML_DIR/bin/:\$PATH:/usr/netscreen/DevSvr/utils/:/usr/netscreen/GuiSvr/utils/:/usr/netscreen/HaSvr/utils/;\
    NS_PRINTER_LEVEL=debugr;\
    NSMUSER=\"global/super\";\
    NSMPASSWD=\"netscreen\";\
    export LD_LIBRARY_PATH PATH NS_PRINTER_LEVEL NSMUSER NSMPASSWD;\
