]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/setup/misc.c
apache: Write hostname into configuration at boot time
[ipfire-2.x.git] / src / setup / misc.c
index 2a9f1312f160bdac6e9e530391d8b66d691d62a8..0710c5b955a6488c62ea4c5ff71793a19bd78a7b 100644 (file)
@@ -57,15 +57,6 @@ int writehostsfiles(void)
        findkey(kv, "DOMAINNAME", domainname);
        freekeyvalues(kv);
                
-       if (!(file = fopen(CONFIG_ROOT "/main/hostname.conf", "w")))
-       {
-               sprintf (message, _("Unable to write %s/main/hostname.conf"), CONFIG_ROOT);
-               errorbox(message);
-               return 0;
-       }
-       fprintf(file, "ServerName %s.%s\n", hostname,domainname);
-       fclose(file);
-       
        if (!(file = fopen(CONFIG_ROOT "/main/hosts", "r")))
        {
                errorbox(_("Unable to open main hosts file."));
@@ -131,7 +122,7 @@ int writehostsfiles(void)
        fclose(file);
        
        sprintf(commandstring, "/bin/hostname %s.%s", hostname, domainname);
-       if (mysystem(commandstring))
+       if (mysystem(NULL, commandstring))
        {
                errorbox(_("Unable to set hostname."));
                return 0;
@@ -139,13 +130,3 @@ int writehostsfiles(void)
        
        return 1;
 }      
-
-int handleisdn(void)
-{
-       char command[STRING_SIZE];
-       sprintf(command, "/etc/rc.d/init.d/mISDN config");
-       if (runcommandwithstatus(command, _("ISDN"), _("Scanning and configuring ISDN devices.")))
-               errorbox(_("Unable to scan for ISDN devices."));
-       // Need to write some lines that count the cards and say the names...
-       return 1;
-}