<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#f4f6f6">
    Hi Donald,<br>
    <br>
    it's not a problem with hostname itself, it's just an example. I'm
    trying to figure out, what is allowed while what isn't in "-f" mode
    :-)<br>
    <br>
    Thank you.<br>
    <br>
    <div class="moz-cite-prefix">On 03.12.2019 14:41, Donald Sharp
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAK989ycL2BvYLTz7MGUqAfMcB6rGHSxBXw7MGAxiVHmspA-dhw@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">hostname is another of the special cases unfortunately, it's in a bit
of a messed up state and probably could do with someone coming in and
working on it.  In all honesty it does not set the hosts name at all
and only sets up what you see in vtysh itself.  Why not just use the
normal linux way of setting a hostname?

donald


On Tue, Dec 3, 2019 at 2:25 AM Volodymyr Litovka <a class="moz-txt-link-rfc2396E" href="mailto:doka.ua@gmx.com"><doka.ua@gmx.com></a> wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">
Hi Donald,

thanks for pointing on this, partially it works:

# cat inp.txt
hostname qqq
no router bgp
router bgp 12345
# vtysh -f inp.txt
# vtysh

Hello, this is FRRouting (version 7.2).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

qlt# sh run
Building configuration...

Current configuration:
!
frr version 7.2
frr defaults traditional
hostname qlt
log syslog
no ipv6 forwarding
service integrated-vtysh-config
!
password 12345
!
router bgp 12345
!
line vty
!
end
qlt#


So, it FRR accepted "no router bgp / router bgp 12345", but didn't "hostname". Are there limitations on commands which can be used with "-f" key?

Thank you.

On 03.12.2019 03:43, Donald Sharp wrote:

so using the `-f` option implies that you are in configuration
sub-mode for FRR.  `show daemons` is not a configuration command and
will fail the installation.

donald

On Mon, Dec 2, 2019 at 3:24 PM Volodymyr Litovka <a class="moz-txt-link-rfc2396E" href="mailto:doka.ua@gmx.com"><doka.ua@gmx.com></a> wrote:

Dear friends,

probably, I'm missing something, but I'm not able to use "vtysh -f <filename>", while "vtysh -c" works perfectly:

# vtysh -c "show daemons"
 zebra bgpd watchfrr staticd
# cat inp.txt
show daemons
# vtysh -f inp.txt
line 1: % Unknown command[4]: show daemons
# echo "show daemons" | vtysh -f /dev/stdin
line 1: % Unknown command[4]: show daemons

FRR v7.2 under Ubuntu 18.04

I will appreciate any ideas on how to configure FRR using pre-generated configuration.

Thank you!

--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison

_______________________________________________
frog mailing list
<a class="moz-txt-link-abbreviated" href="mailto:frog@lists.frrouting.org">frog@lists.frrouting.org</a>
<a class="moz-txt-link-freetext" href="https://lists.frrouting.org/listinfo/frog">https://lists.frrouting.org/listinfo/frog</a>


--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison
</pre>
      </blockquote>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">--
Volodymyr Litovka
  "Vision without Execution is Hallucination." -- Thomas Edison</pre>
  </body>
</html>