projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fa512f
)
Comment out /etc/inittab entries instead of deleting them
author
Art Cancro
<ajc@citadel.org>
Tue, 19 Dec 2006 03:42:29 +0000
(
03:42
+0000)
committer
Art Cancro
<ajc@citadel.org>
Tue, 19 Dec 2006 03:42:29 +0000
(
03:42
+0000)
citadel/setup.c
patch
|
blob
|
history
diff --git
a/citadel/setup.c
b/citadel/setup.c
index 2bf31284eaa0201f7962f0093f4f8ec1661b6075..62534334d53c3aa6f46bd76577e6db6f832ec8c7 100644
(file)
--- 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);