Re: [PATCH 4/4] If anaconda is not run from loader or liveinst, fail.

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

 



Chris Lumens wrote:
Running anaconda from the command line has only ever been halfway supported
or functional.  Now with test mode and rootPath modes gone, running from the
command line doesn't make any sense.  So, catch this case and exit.
Hi,

I'm new to working on the code that allows RedHat Linux to be installed on our hardware, so I'm not sure if this will affect us or not.

For a number of reasons, we currently have our customers boot an install initrd that has a file named /tmp/updates/anaconda present. (It's my understanding that if present it's used instead of the normal anaconda binary. Has that changed?) In our case this file is a shell script that calls the original anaconda, and performs some additional install work after anaconda exits.

So will the change you are describing prevent this script from running anaconda?

What release will this change likely appear in?

 -Kyle


---
 anaconda |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/anaconda b/anaconda
index ed72947..4aa002a 100755
--- a/anaconda
+++ b/anaconda
@@ -642,9 +642,19 @@ if __name__ == "__main__":
(opts, args) = parseOptions() + try:
+        parent = os.path.realpath("/proc/%s/exe" % os.getppid())
+    except:
+        parent = "/sbin/loader"
+
     if opts.unsupportedMode:
         stdoutLog.error("Running anaconda in %s mode is no longer supported." % opts.unsupportedMode)
         sys.exit(0)
+    elif not opts.liveinst or not parent.endswith("/loader"):
+        stdoutLog.error("Running anaconda from the command line is not supported.\n"
+                        "Please start anaconda either from the boot media or from "
+                        "the livecd environment.")
+        sys.exit(0)
# Now that we've got arguments, do some extra processing.
     instClass = getInstClass()

_______________________________________________
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