Skip to content

Conversation

@zachyordy
Copy link

Although "/var/lib/tftpboot" is the correct default directory for many TFTP servers, it's not the default path when files are copied from those servers. Many users are going to be using something like tftpd-hpa on Ubuntu. This (and many other SCP / FTP / TFTP clients) have their own root directory which is directly exposed when the user tries to copy. That is to say, if the user just copies from [email protected]/filename, they will, by default, be copying from /var/lib/tftpboot. We should put saner defaults into the script so that the user doesn't run into errors like this:

2017 Sep 27 17:53:00 switch %$ VDC-1 %$ %USER-1-SYSTEM_MSG: S/N[REDACTED]-MAC[RE:DA:CT:ED] - Command is : terminal dont-ask ; terminal password copy tftp://192.168.1.1/var/lib/tftpboot/poap.cfg.md5 bootflash:/poap.cfg.md5.tmp vrf default - script.sh

What we're really looking for (instead of "copy tftp://192.168.1.1/var/lib/tftpboot/poap.cfg.md5 bootflash:/poap.cfg.md5.tmp vrf default") is something like "copy tftp://192.168.1.1/poap.cfg.md5 bootflash:/poap.cfg.md5.tmp vrf default"

This is because those files in the TFTP (or SCP or FTP) root should be exposed directly to the user by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant