3 @@ -2601,6 +2601,13 @@ DEFUN (config_write_file,
9 + /* This code fails on UNION MOUNTs and similar filesystems if the
10 + * config file is still on the RO layer. Hardlinks across layers
11 + * will not work and cause quagga to fail saving the configuration...
12 + * should use rename() to move files around...
14 if (link (config_file, config_file_sav) != 0)
16 vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav,
17 @@ -2614,7 +2621,23 @@ DEFUN (config_write_file,
22 + /* And this is the code that hopefully does work */
23 + if (rename (config_file, config_file_sav) != 0)
25 + vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav,
33 + /* same here. Please no cross-filesystem hardlinks... */
34 if (link (config_file_tmp, config_file) != 0)
36 + if (rename (config_file_tmp, config_file) != 0)
39 vty_out (vty, "Can't save configuration file %s.%s", config_file,