Skip to content

Commit

Permalink
snap: add vtysh as a "proper" command alias for frr.vtysh
Browse files Browse the repository at this point in the history
   This allows direct access to vtysh without the "frr." prefix.
   The alias can be enabled by sudo snap frr vtysh

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
  • Loading branch information
Jafaral authored and qlyoung committed May 15, 2017
1 parent 7b87a0d commit 7ce9737
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
15 changes: 12 additions & 3 deletions snapcraft/README.snap_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,16 @@ All the commands are prefixed with frr.
frr.zebra-debug

vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your
path). If access as `vtysh` instead of `frr.vtysh` is needed, a symlink
can be created:
path). If access as `vtysh` instead of `frr.vtysh` is needed, you can enable it
via a snap alias as follows:

sudo ln -s /snap/bin/frr.vtysh /usr/local/bin/vtysh
sudo snap alias frr vtysh

This will add the vtysh command to your /snap/bin for direct access. The output of

sudo snap aliases

should list vtysh command alias as enabled:

App Alias Notes
frr.vtysh vtysh enabled
18 changes: 11 additions & 7 deletions snapcraft/README.usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,17 @@ FAQ
`export VTYSH_PAGER=cat` to the end of your `.profile`)

- ospfd / ospf6d are not running after installation
- Installing a new snap starts the daemons, but at this time they
may not have the required priviledged access. Make sure you
issue the `snap connect` command as given above (can be verified
with `snap interfaces`) and **THEN** restart the daemons (or
reboot the system).
This is a limitation of any snap package at this time which
requires priviledged interfaces (ie to manipulate routing tables)
- Installing a new snap starts the daemons, but at this time they
may not have the required priviledged access. Make sure you
issue the `snap connect` command as given above (can be verified
with `snap interfaces`) and **THEN** restart the daemons (or
reboot the system).
This is a limitation of any snap package at this time which
requires priviledged interfaces (ie to manipulate routing tables)

- Can I run vtysh directly without the "frr." prefix?
- Yes, enable the vtysh alias in the frr snap package by:
sudo snap alias frr vtysh

Sourcecode available
====================
Expand Down
1 change: 1 addition & 0 deletions snapcraft/snapcraft.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ apps:
- network
- network-bind
- network-control
aliases: [vtysh]
version:
command: bin/show_version
readme:
Expand Down

0 comments on commit 7ce9737

Please sign in to comment.