From: Art Cancro Date: Tue, 19 Dec 2006 03:42:29 +0000 (+0000) Subject: Comment out /etc/inittab entries instead of deleting them X-Git-Tag: v7.86~3786 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=1051f51c831bdb11c76d41849877e76b084d9db7;p=citadel.git Comment out /etc/inittab entries instead of deleting them --- diff --git a/citadel/setup.c b/citadel/setup.c index 2bf31284e..62534334d 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -419,12 +419,11 @@ void delete_inittab_entry(void) } while (fgets(buf, sizeof buf, infp) != NULL) { - if (strstr(buf, looking_for) == NULL) { - fwrite(buf, strlen(buf), 1, outfp); - } - else { + if (strstr(buf, looking_for) != NULL) { + fwrite("#", 1, 1, outfp); ++changes_made; } + fwrite(buf, strlen(buf), 1, outfp); } fclose(infp);