[PATCH] Correctly accept 'sshd' boot arg as alias for 'inst.sshd' (#924157)

Will Woods wwoods at redhat.com
Fri Oct 25 21:02:26 UTC 2013


In dracut/parse-anaconda-options.sh we have:

  check_depr_arg "sshd" "inst.sshd"

which makes us accept "sshd" as an alias for inst.sshd, *inside* the
initrd. But this script runs in the anaconda runtime, so we don't have
/etc/cmdline.d/75-anaconda-options.conf anymore, so getarg only sees
the actual boot args - which don't contain inst.sshd.

We could copy /run/install/cmdline.d/* into /etc/cmdline.d, but I'm not
sure if that would have surprising or unintended side-effects.

So let's do the simple thing: check for both inst.sshd and sshd.
---
 data/systemd/anaconda-generator | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/systemd/anaconda-generator b/data/systemd/anaconda-generator
index 41ee092..ba82c8f 100755
--- a/data/systemd/anaconda-generator
+++ b/data/systemd/anaconda-generator
@@ -45,6 +45,6 @@ done
 # platform.  Really any platform with a crappy console that can't do curses
 # or have multiple VTs should get sshd spawned automatically, but we don't
 # yet have a good way of detecting these platforms.
-if getargbool 0 inst.sshd || [ $(uname -m) = "s390x" ]; then
+if getargbool 0 sshd inst.sshd || [ $(uname -m) = "s390x" ]; then
     ln -sf $systemd_dir/anaconda-sshd.service $target_dir/anaconda-sshd.service
 fi
-- 
1.8.3.1



More information about the anaconda-patches mailing list