[PATCH] Stop pretending liveinst+rescue is supported (#1256061).

Chris Lumens clumens at redhat.com
Wed Aug 26 20:22:06 UTC 2015


Also, document that liveinst+kickstart is not supported in the --help
output as well.
---
 data/anaconda_options.txt |  5 +++--
 data/liveinst/liveinst    | 17 ++++++++++++-----
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/data/anaconda_options.txt b/data/anaconda_options.txt
index de13323..a42c453 100644
--- a/data/anaconda_options.txt
+++ b/data/anaconda_options.txt
@@ -30,10 +30,11 @@ syntax see the Anaconda options wiki page: http://fedoraproject.org/wiki/Anacond
 
 kickstart
 Gives the local file path to use for kickstart. Normally only used when running anaconda
-from the cmdline.
+from the cmdline.  This option is not supported for live installations.
 
 rescue
-Start the rescue environment instead of installation.
+Start the rescue environment instead of installation.  This option is not supported for
+live installations.
 
 armplatform
 Can be used to specify the ARM platform for the installation by passing the appropriate PLATFORM_ID.
diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst
index b5b776b..5ecb474 100755
--- a/data/liveinst/liveinst
+++ b/data/liveinst/liveinst
@@ -20,10 +20,6 @@
 
 LIVE_INSTALL=0
 IMAGE_INSTALL=0
-RESCUE=0
-if [[ "$LIVECMD $*" =~ "--rescue" ]]; then
-    RESCUE=1
-fi
 
 if [ -z "$LIVECMD" ]; then
     LIVE_INSTALL=1
@@ -134,6 +130,17 @@ for opt in `cat /proc/cmdline` $*; do
             echo "$text" >&2
          fi
         ;;
+    rescue|--rescue)
+        title="Configuration not supported"
+        text="Rescue mode is not supported on live media.  Please use the normal system tools to recover your system."
+        if which zenity &> /dev/null; then
+            zenity --warning --title="$title" --text="$text"
+         else
+            echo "$title" >&2
+            echo "$text" >&2
+         fi
+         exit 1
+        ;;
     esac
 done
 
@@ -189,7 +196,7 @@ if [ -e /tmp/updates ]; then rm -r /tmp/updates; fi
 if [ -e /tmp/updates.img ]; then rm /tmp/updates.img; fi
 
 # try to teardown the filesystems if this was an image install
-if [ $IMAGE_INSTALL = 1 -a $RESCUE = 0 ]; then
+if [ $IMAGE_INSTALL = 1 ]; then
     anaconda-cleanup
 fi
 
-- 
2.4.3



More information about the anaconda-patches mailing list