[prev in list] [next in list] [prev in thread] [next in thread]
List: ipcop-svn
Subject: [Ipcop-svn] SF.net SVN: ipcop:[2141] ipcop/trunk
From: gespinasse () users ! sourceforge ! net
Date: 2008-11-30 16:54:27
Message-ID: E1L6pYx-00067Q-Jb () 74yxhf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 2141
http://ipcop.svn.sourceforge.net/ipcop/?rev=2141&view=rev
Author: gespinasse
Date: 2008-11-30 16:54:27 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Remove etc/hostname and etc/domainname
and go back to the method used on 1.4
We should only do things once and right.
There, we had the host name and domain in two places.
That would have require to rewrite etc/hostname and etc/domainname after a restore \
(or include them in backup)
This remove too a second bug as etc/domainname was not rewritten after a change \
inside setup.
Add a comment on writehostsfile function that the hostname is updated there
Modified Paths:
--------------
ipcop/trunk/config/rootfiles/common/stage2
ipcop/trunk/src/installer/host_domain.c
ipcop/trunk/src/rc.d/rc.sysinit
Removed Paths:
-------------
ipcop/trunk/config/etc/domainname
ipcop/trunk/config/etc/hostname
Deleted: ipcop/trunk/config/etc/domainname
===================================================================
--- ipcop/trunk/config/etc/domainname 2008-11-30 15:41:06 UTC (rev 2140)
+++ ipcop/trunk/config/etc/domainname 2008-11-30 16:54:27 UTC (rev 2141)
@@ -1 +0,0 @@
-localdomain
Deleted: ipcop/trunk/config/etc/hostname
===================================================================
--- ipcop/trunk/config/etc/hostname 2008-11-30 15:41:06 UTC (rev 2140)
+++ ipcop/trunk/config/etc/hostname 2008-11-30 16:54:27 UTC (rev 2141)
@@ -1 +0,0 @@
-ipcop.localdomain
Modified: ipcop/trunk/config/rootfiles/common/stage2
===================================================================
--- ipcop/trunk/config/rootfiles/common/stage2 2008-11-30 15:41:06 UTC (rev 2140)
+++ ipcop/trunk/config/rootfiles/common/stage2 2008-11-30 16:54:27 UTC (rev 2141)
@@ -6,10 +6,8 @@
dev/null
#boot
etc/certparams
-etc/domainname
etc/group
etc/host.conf
-etc/hostname
etc/hosts
etc/inittab
etc/inputrc
Modified: ipcop/trunk/src/installer/host_domain.c
===================================================================
--- ipcop/trunk/src/installer/host_domain.c 2008-11-30 15:41:06 UTC (rev 2140)
+++ ipcop/trunk/src/installer/host_domain.c 2008-11-30 16:54:27 UTC (rev 2141)
@@ -39,7 +39,7 @@
static char domainname[STRING_SIZE] = "";
-/* rewrite /etc/hosts, /etc/hostname and the Apache ServerName file */
+/* rewrite /etc/hosts, the Apache ServerName file and update the hostname */
static int writehostsfiles(char *hostname, char *domainname)
{
FILE *file;
@@ -71,14 +71,6 @@
return FAILURE;
}
- /* write /etc/hostname */
- if (!(file = fopen("/etc/hostname", "w"))) {
- errorbox(gettext("UNABLE_TO_WRITE_HOSTNAME"));
- return FAILURE;
- }
- fprintf(file, "%s\n", hostname);
- fclose(file);
-
return SUCCESS;
}
Modified: ipcop/trunk/src/rc.d/rc.sysinit
===================================================================
--- ipcop/trunk/src/rc.d/rc.sysinit 2008-11-30 15:41:06 UTC (rev 2140)
+++ ipcop/trunk/src/rc.d/rc.sysinit 2008-11-30 16:54:27 UTC (rev 2141)
@@ -120,7 +120,11 @@
fi
echo "Setting hostname"
-/bin/hostname -F /etc/hostname
+if [ -z "$DOMAINNAME" ]; then
+ /bin/hostname $HOSTNAME
+else
+ /bin/hostname ${HOSTNAME}.${DOMAINNAME}
+fi
# Initializing Power Management ACPI first, then APM.
# APM won't load if ACPI is initialized anyway.
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic