Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 230777 Details for
Bug 318365
systemd - Replacement for sysvinit with extensive usage of parallelization
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
systemd-9999-gentoo-hostname.patch - read the hostname from /etc/conf.d/hostname
systemd-9999-gentoo-hostname.patch (text/plain), 1.33 KB, created by
Fabian Henze
on 2010-05-08 09:32:29 UTC
(
hide
)
Description:
systemd-9999-gentoo-hostname.patch - read the hostname from /etc/conf.d/hostname
Filename:
MIME Type:
Creator:
Fabian Henze
Created:
2010-05-08 09:32:29 UTC
Size:
1.33 KB
patch
obsolete
>--- a/hostname-setup.c 2010-05-08 10:42:46.308140618 +0200 >+++ b/hostname-setup.c 2010-05-08 11:05:50.526138314 +0200 >@@ -116,6 +116,51 @@ finish: > fclose(f); > return r; > >+#elif defined(TARGET_GENTOO) >+ int r; >+ FILE *f; >+ >+ assert(hn); >+ >+ if (!(f = fopen("/etc/conf.d/hostname", "re"))) >+ return -errno; >+ >+ for (;;) { >+ char line[LINE_MAX]; >+ char *s, *k; >+ >+ if (!fgets(line, sizeof(line), f)) { >+ if (feof(f)) >+ break; >+ >+ r = -errno; >+ goto finish; >+ } >+ >+ s = strstrip(line); >+ >+ if (!startswith(s, "HOSTNAME=") && !startswith(s, "hostname=")) >+ continue; >+ >+ if (!(k = strdup(s+9))) { >+ r = -ENOMEM; >+ goto finish; >+ } >+ if (!(k = delete_chars(k, "\"\'"))) { >+ r = -ENOMEM; /* is ENOMEM correct here? */ >+ goto finish; >+ } >+ >+ *hn = k; >+ break; >+ } >+ >+ r = 0; >+ >+finish: >+ fclose(f); >+ return r; >+ > #elif defined(TARGET_SUSE) > int r; > char *s, *k;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 318365
:
230771
|
230773
|
230777
|
230779
|
230887
|
230889
|
231157
|
231305
|
238431
|
241097
|
241099
|
244953
|
244955
|
244957
|
244959
|
256198
|
256199
|
256201
|
256202
|
256203
|
256205
|
256209
|
256319
|
256349
|
256351
|
256352
|
256435
|
256437
|
256439
|
256446
|
256698
|
257917
|
257922
|
270185
|
270187
|
270189
|
270191
|
271583
|
277115
|
277117
|
306293
|
306295
|
306297
|
306299
|
306339
|
306341
|
306343
|
306345