/* We don't write vtysh specific into file from vtysh. vtysh.conf should * be edited by hand. So, we handle only "write terminal" case here and * integrate vtysh specific conf with conf from daemons. */ void vtysh_config_write () { char line[81]; extern struct host host; if (host.name) { sprintf (line, "hostname %s", host.name); vtysh_config_parse_line(line); } if (vtysh_writeconfig_integrated) vtysh_config_parse_line ("service integrated-vtysh-config"); }
void vtysh_config_parse (char *line) { char *begin; char *pnt; begin = pnt = line; while (*pnt != '\0') { if (*pnt == '\n') { *pnt++ = '\0'; vtysh_config_parse_line (begin); begin = pnt; } else { pnt++; } } }