Allow configTtys() be called several times - set VAR_CONSTERM to "NO" after

operation done.
This commit is contained in:
Andrey A. Chernov 2001-08-02 16:36:21 +00:00
parent a8ec1b4851
commit bd376a3487

View File

@ -142,11 +142,14 @@ configTtys(void)
if (fclose(np)) { if (fclose(np)) {
if (changed) if (changed)
msgConfirm("%s: close error: %s", templ, strerror(errno)); msgConfirm("%s: close error: %s", templ, strerror(errno));
else
variable_set2(VAR_CONSTERM, "NO", 0);
(void)unlink(templ); (void)unlink(templ);
return; return;
} }
if (!changed) { if (!changed) {
(void)unlink(templ); (void)unlink(templ);
variable_set2(VAR_CONSTERM, "NO", 0);
return; return;
} }
if (rename(templ, _PATH_TTYS)) { if (rename(templ, _PATH_TTYS)) {
@ -154,4 +157,5 @@ configTtys(void)
strerror(errno)); strerror(errno));
return; return;
} }
variable_set2(VAR_CONSTERM, "NO", 0);
} }