Page MenuHomeVyOS Platform

Identify and remove dead code


If we are rewriting things, we also need to know which things do not need rewrite because they are not used to begin with.

This includes:

  1. Command definitions that are inaccessible or hidden
  2. Scripts that are not referenced by other scripts or command definitions
  3. Modules that are not imported by any scripts
  4. Module functions that are not used anywhere

In this order I think.


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close

Event Timeline

dmbaturin triaged this task as Low priority.May 31 2018, 4:16 AM
dmbaturin created this task.
dmbaturin created this object with visibility "Public (No Login Required)".

Completely dead:

/opt/vyatta/sbin/ — apparently not referenced anywhere.
/opt/vyatta/sbin/check_tmpl — same.
/opt/vyatta/sbin/dump — what is that even?
/opt/vyatta/sbin/exe_action — same.
/opt/vyatta/sbin/test_uf — same.

/opt/vyatta/sbin/ — not referenced anywhere.
/opt/vyatta/sbin/ — same.
/opt/vyatta/sbin/ — same.
/opt/vyatta/sbin/ — same.
/opt/vyatta/sbin/ — same.

/opt/vyatta/bin/ — an early attempt at popularity contest implementation, due for replacement anyway.

/opt/vyatta/bin/ — appears unused.
/opt/vyatta/bin/ — same.
/opt/vyatta/bin/sudo-users/ — same.

/opt/vyatta/bin/config-downgrade (and with it all config downgrade scripts) — never used and never really tested, abandoned at VC4.0 time.

Redundant and easy to replace:

/opt/vyatta/sbin/check_prefix_boundary — referenced by a few command template, candidate for replacement with ipaddrcheck-based validator.
/opt/vyatta/sbin/dhcpd.init — shouldn't we be using systemd for it now?
/opt/vyatta/sbin/dhcpdv6.init — same.
/opt/vyatta/sbin/ — same.
/opt/vyatta/sbin/firewall.init — same.
/opt/vyatta/sbin/hostapd-init — same.

/opt/vyatta/sbin/if-mib-alias — used in a single script.

/opt/vyatta/sbin/telnetd.init — how do we go about telnet server in the end?

/opt/vyatta/sbin/valid_address — used by a few templates all in vyatta-cfg, easy to replace with ipaddrcheck.

/opt/vyatta/sbin/ — used by a single command.

/opt/vyatta/sbin/ — now that IRQ affinity of NICs is automated in the kernel, do we need to keep it?

/opt/vyatta/sbin/ — used by a single command.

/opt/vyatta/sbin/vyatta-validate-type and — duplicates of each other.

/opt/vyatta/bin/vyatta-sudo — used by three commands for unclear reasons.

dmbaturin moved this task from Need Triage to Wishlist on the VyOS 1.2 Crux board.Jun 3 2018, 3:44 AM

This script can be removed as soon as we will implement better way for populating AS numbers in netflow configuration.

After implementation of the patch it will be safe to remove references to
/etc/pmacct/networks.lst and script

syncer changed the subtype of this task from "Task" to "Enhancement".Oct 20 2018, 4:49 AM
pasik added a subscriber: pasik.Mar 12 2019, 6:10 PM