Re: [PATCH] Bring up networking early enough for syslog= param (#470513)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





David Cantrell wrote:
If a user boots from boot.iso and specifies syslog=HOST, we need
to send them through the network configuration steps in loader so
that networking is available by the time anaconda starts.
---
 loader/loader.c |   11 +++++++++--
 loader/loader.h |    3 ++-
 2 files changed, 11 insertions(+), 3 deletions(-)


Looks good to me.

Regards,

Hans

diff --git a/loader/loader.c b/loader/loader.c
index af83eff..575aa7f 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1121,6 +1121,11 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
                     flags |= LOADER_FLAGS_GRAPHICAL;
                 }
+ if (!strncasecmp(argv[i], "syslog", 6)) {
+                    logMessage(INFO, "early networking required for syslog");
+                    flags |= LOADER_FLAGS_EARLY_NETWORKING;
+                }
+
                 if (!strncasecmp(argv[i], "vesa", 4)) {
                     if (asprintf(&extraArgs[numExtraArgs],
                                  "--xdriver=vesa") == -1) {
@@ -1377,7 +1382,8 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
             }
case STEP_DRIVER: {
-                if (class == -1 || haveDeviceOfType(class)) {
+                if ((FL_EARLY_NETWORKING(flags) && haveDeviceOfType(DEVICE_NETWORK)) ||
+                    (class == -1 || haveDeviceOfType(class))) {
                     step = STEP_NETWORK;
                     dir = 1;
                     class = -1;
@@ -1437,7 +1443,8 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
             case STEP_NETWORK: {
                 if ((installMethods[validMethods[loaderData->method]].type !=
                       DEVICE_NETWORK) && (!hasGraphicalOverride()) &&
-                     !FL_ASKNETWORK(flags)) {
+                     !FL_ASKNETWORK(flags) &&
+                     !FL_EARLY_NETWORKING(flags)) {
                     needsNetwork = 0;
if (dir == 1) step = STEP_STAGE2;
diff --git a/loader/loader.h b/loader/loader.h
index 9619071..a6e2d05 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -36,7 +36,7 @@
 #define LOADER_FLAGS_POWEROFF           (((uint64_t) 1) << 6)
 #define LOADER_FLAGS_NOPROBE              (((uint64_t) 1) << 7)
 #define LOADER_FLAGS_MODDISK            (((uint64_t) 1) << 8)
-/* #9 is the most delicious of all flags, also available for use */
+#define LOADER_FLAGS_EARLY_NETWORKING   (((uint64_t) 1) << 9)
 #define LOADER_FLAGS_SERIAL             (((uint64_t) 1) << 10)
 #define LOADER_FLAGS_UPDATES            (((uint64_t) 1) << 11)
 #define LOADER_FLAGS_KSFILE             (((uint64_t) 1) << 12)
@@ -77,6 +77,7 @@
 #define FL_POWEROFF(a)           ((a) & LOADER_FLAGS_POWEROFF)
 #define FL_NOPROBE(a)            ((a) & LOADER_FLAGS_NOPROBE)
 #define FL_MODDISK(a)            ((a) & LOADER_FLAGS_MODDISK)
+#define FL_EARLY_NETWORKING(a)   ((a) & LOADER_FLAGS_EARLY_NETWORKING)
 #define FL_SERIAL(a)             ((a) & LOADER_FLAGS_SERIAL)
 #define FL_UPDATES(a)            ((a) & LOADER_FLAGS_UPDATES)
 #define FL_KSFILE(a)             ((a) & LOADER_FLAGS_KSFILE)

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux