mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
Hostname, #271. rcS needs hostname -F /etc/hostname before ifup
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@487 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -205,9 +205,16 @@ char *netGetHostname( void )
|
||||
|
||||
void netSetHostname( char *host )
|
||||
{
|
||||
FILE * fp;
|
||||
|
||||
strcpy(hostbuf,host);
|
||||
hostis=1;
|
||||
sethostname(hostbuf,strlen(hostbuf)+1);
|
||||
fp = fopen("/etc/hostname", "w");
|
||||
if(fp != NULL) {
|
||||
fprintf(fp, "%s\n", hostbuf);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
void netSetNameserver(const char * const ip)
|
||||
|
Reference in New Issue
Block a user