Merge pull request #167 from qlyoung/vtysh-subs-stable

vtysh: Quagga.conf -> Frr.conf
This commit is contained in:
Martin Winter 2017-02-03 12:11:18 -08:00 committed by GitHub
commit 1b4ae82d37
2 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@ DECLARE_MGROUP(MVTYSH)
/* vtysh local configuration file. */ /* vtysh local configuration file. */
#define VTYSH_DEFAULT_CONFIG "vtysh.conf" #define VTYSH_DEFAULT_CONFIG "vtysh.conf"
#define QUAGGA_DEFAULT_CONFIG "Quagga.conf" #define FRR_DEFAULT_CONFIG "Frr.conf"
enum vtysh_write_integrated { enum vtysh_write_integrated {
WRITE_INTEGRATED_UNSPECIFIED, WRITE_INTEGRATED_UNSPECIFIED,

View File

@ -46,7 +46,7 @@ char *progname;
/* Configuration file name and directory. */ /* Configuration file name and directory. */
static char vtysh_config_always[MAXPATHLEN] = SYSCONFDIR VTYSH_DEFAULT_CONFIG; static char vtysh_config_always[MAXPATHLEN] = SYSCONFDIR VTYSH_DEFAULT_CONFIG;
static char quagga_config_default[MAXPATHLEN] = SYSCONFDIR QUAGGA_DEFAULT_CONFIG; static char quagga_config_default[MAXPATHLEN] = SYSCONFDIR FRR_DEFAULT_CONFIG;
char *quagga_config = quagga_config_default; char *quagga_config = quagga_config_default;
char history_file[MAXPATHLEN]; char history_file[MAXPATHLEN];
@ -357,17 +357,17 @@ main (int argc, char **argv, char **env)
/* /*
* Overwrite location for Quagga.conf * Overwrite location for Quagga.conf
*/ */
vtysh_configfile_name = strrchr(QUAGGA_DEFAULT_CONFIG, '/'); vtysh_configfile_name = strrchr(FRR_DEFAULT_CONFIG, '/');
if (vtysh_configfile_name) if (vtysh_configfile_name)
/* skip '/' */ /* skip '/' */
vtysh_configfile_name++; vtysh_configfile_name++;
else else
/* /*
* QUAGGA_DEFAULT_CONFIG configured with relative path * FRR_DEFAULT_CONFIG configured with relative path
* during config? Should really never happen for * during config? Should really never happen for
* sensible config * sensible config
*/ */
vtysh_configfile_name = (char *) QUAGGA_DEFAULT_CONFIG; vtysh_configfile_name = (char *) FRR_DEFAULT_CONFIG;
strlcpy(quagga_config_default, optarg, sizeof(vtysh_config_always)); strlcpy(quagga_config_default, optarg, sizeof(vtysh_config_always));
strlcat(quagga_config_default, "/", sizeof(vtysh_config_always)); strlcat(quagga_config_default, "/", sizeof(vtysh_config_always));
strlcat(quagga_config_default, vtysh_configfile_name, strlcat(quagga_config_default, vtysh_configfile_name,