Don't try to twiddle /etc/inittab on systems that don't have /etc/inittab.
authorArt Cancro <ajc@citadel.org>
Tue, 13 Dec 2005 19:42:16 +0000 (19:42 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 13 Dec 2005 19:42:16 +0000 (19:42 +0000)
webcit/ChangeLog
webcit/setup.c

index 188def57002834430e825f76cf2a123b0dcbe8ee..37529ee9bed77ef001e32d4a17d2b3449d2db22d 100644 (file)
@@ -1,5 +1,8 @@
 $Id$
 
+Tue Dec 13 14:41:50 EST 2005 ajc
+* Don't try to twiddle /etc/inittab on systems that don't have /etc/inittab.
+
 Tue Dec 13 14:27:24 EST 2005 ajc
 * chatframeset.html: inserted a missing </body> tag.
 
index cfdc7a9c4079785d04e8e51d5d01cb43d3c52f5d..69fad9757cedebaf02c612aa118e5a7f0ce09eb5 100644 (file)
@@ -620,6 +620,15 @@ int main(int argc, char *argv[])
                cleanup(0);
        }
 
+       /* If we're on something BSDish then we don't have inittab */
+       if (access("/etc/inittab", F_OK)) {
+               important_message("Not running SysV style init",
+                               "WebCit Setup can only run on systems that use /etc/inittab.\n"
+                               "Please manually configure your startup scripts to run WebCit\n"
+                               "when the system is booted.\n");
+               cleanup(0);
+       }
+
        /* Get started in a valid setup directory. */
        strcpy(setup_directory, WEBCITDIR);
        if ( (using_web_installer) && (getenv("WEBCIT") != NULL) ) {