From a89c7e5c7b8fe383bde60ea2566395e45bf82125 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 19 Dec 2006 14:23:34 +0000 Subject: [PATCH] If /etc/inittab is not found, return quietly instead of displaying a scary error message. FreeBSD, Mac OS, and the newest version of Ubuntu do not have this file. --- citadel/setup.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/citadel/setup.c b/citadel/setup.c index 54474cd64..114323eea 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -404,6 +404,16 @@ void delete_inittab_entry(void) /* Now tweak /etc/inittab */ infp = fopen("/etc/inittab", "r"); if (infp == NULL) { + + /* If /etc/inittab does not exist, return quietly. + * Not all host platforms have it. + */ + if (errno == ENOENT) { + return; + } + + /* Other errors might mean something really did go wrong. + */ sprintf(buf, "Cannot open /etc/inittab: %s", strerror(errno)); display_error(buf); return; -- 2.39.2