On Mon, 2012-10-08 at 20:25 -0700, Jesse Keating wrote:
When installing on s390x, we just want to run pure anaconda on the
tty.
This will either detect s390x and print out ssh details for the user to
ssh in to continue the isntall (and get tmux), or if a kickstart was
provided and the RUNKS option was used it will just blast through the
kickstart in cmdline mode. Tmux doesn't work in x3270, the terminal for
s390x, so we have to avoid using it.
---
data/systemd/anaconda-direct@.service | 13 +++++++++++++
data/systemd/anaconda-generator | 7 +++++--
2 files changed, 18 insertions(+), 2 deletions(-)
create mode 100644 data/systemd/anaconda-direct@.service
diff --git a/data/systemd/anaconda-direct@.service
b/data/systemd/anaconda-direct@.service
new file mode 100644
index 0000000..99d2c85
--- /dev/null
+++ b/data/systemd/anaconda-direct@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=the anaconda installation program
+Wants=instperf.service rsyslog.service udev-settle.service NetworkManager.service
+After=instperf.service rsyslog.service udev-settle.service NetworkManager.service
+
+[Service]
+Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204
PATH=/usr/bin:/bin:/sbin:/usr
+Type=oneshot
+WorkingDirectory=/root
+ExecStart=/usr/sbin/anaconda
+StandardInput=tty-force
+TimeoutSec=0
Unless you're using the '%I' escapes, the '@XXX' part of the service
name isn't necessary. So you could just call this
'anaconda-direct.service', and change the generator as shown below:
diff --git a/data/systemd/anaconda-generator
b/data/systemd/anaconda-generator
index 4c8b828..e4faf39 100755
--- a/data/systemd/anaconda-generator
+++ b/data/systemd/anaconda-generator
@@ -24,8 +24,11 @@ while [ -f /sys/class/tty/$tty/active ]; do
done
consoletty="$tty"
-# put anaconda on the real console
-service_on_tty anaconda-tmux@.service $consoletty
+# put anaconda on the real console if not s390x, otherwise put anaconda direct
+if [ $(uname -m) = "s390x" ]; then
ln -sf
$systemd_dir/anaconda-direct.service $target_dir
+else
+ service_on_tty anaconda-tmux@.service $consoletty
# put a shell on tty2 and the first virtualization console we find
for tty in tty2 hvc0 hvc1 xvc0 hvsi0 hvsi1 hvsi2; do
Or if you wanted it to stay consistent, you could do
service_on_tty anaconda-direct.service # default tty
Or this might be good - add to the service:
[Install]
WantedBy=anaconda.target
And then in the generator, just do:
systemctl enable anaconda-direct.service
and systemd should set up the link for you[1].
-w
[1] In systemd >= v188 we should be able to do
anaconda-tmux@.service:
[Install]
WantedBy=anaconda.target
anaconda-generator:
systemctl enable anaconda-tmux(a)${tty}.service
rather than having to create the link ourselves for the template case.