[PATCH f17-branch] Complain about "serial" but don't assume ttyS0

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

 



People use "serial" all over the place as some kind of magic voodoo
incantation for "I want text mode and stuff", so rewriting it to
"console=ttyS0" isn't really appropriate.

Let the user know that it's deprecated, and ignore it.
---
 dracut/parse-anaconda-options.sh |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/dracut/parse-anaconda-options.sh b/dracut/parse-anaconda-options.sh
index 6188379..0076fce 100755
--- a/dracut/parse-anaconda-options.sh
+++ b/dracut/parse-anaconda-options.sh
@@ -63,22 +63,28 @@ check_depr_args() {
     local q=""
     for i in $(getargs $1); do check_depr_arg $q "$i" "$2" && q="--quiet"; done
 }
+check_removed_arg() {
+    local arg="$1"; shift
+    if getarg "$arg" > /dev/null; then
+        warn "'$arg' is deprecated and has been removed."
+        [ -n "$*" ] && warn "$*"
+    fi
+}
 
-check_depr_arg "serial" "console=ttyS0"
 check_depr_args "blacklist=" "inst.blacklist=%s"
 check_depr_arg "nofirewire" "inst.blacklist=firewire_ohci"
 
+# serial was never supposed to be used for anything!
+check_removed_arg serial "To change the console use 'console=' instead."
 # USB is built-in and can't be disabled anymore. DEAL WITH IT.
-getarg nousb && warn "'nousb' is deprecated. USB drivers can't be disabled."
+check_removed_arg nousb "USB drivers can't be disabled."
 # ethtool is gone. Who forces their devices to single-duplex anymore?
-getarg ethtool && warn "'ethtool' is deprecated and has been removed."
+check_removed_arg ethtool
 
 # interactive junk in initramfs
 # (maybe we'll bring it back someday?)
-getarg askmethod && warn "'askmethod' is deprecated and has been removed." && \
-                    warn "Use an appropriate 'inst.repo=' argument instead."
-getarg asknetwork && warn "'asknetwork' is deprecated and has been removed." &&\
-                     warn "Use an appropriate 'ip=' argument instead."
+check_removed_arg askmethod "Use an appropriate 'inst.repo=' argument instead."
+check_removed_arg asknetwork "Use an appropriate 'ip=' argument instead."
 
 # lang & keymap
 warn_renamed_arg "lang" "inst.lang"
-- 
1.7.7.6

_______________________________________________
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