[Pkg-libvirt-commits] [libguestfs] 04/19: p2v: Force systemd default target to be multi-user (text mode).

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:12:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.44
in repository libguestfs.

commit 10cb9b9545424d98687a46c23abdc0e3ff77de76
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue May 19 16:36:42 2015 +0100

    p2v: Force systemd default target to be multi-user (text mode).
---
 p2v/p2v.ks.in             | 8 ++++++--
 p2v/p2v.service           | 2 +-
 p2v/virt-p2v-make-disk.in | 1 +
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/p2v/p2v.ks.in b/p2v/p2v.ks.in
index 225f05a..0abad7d 100644
--- a/p2v/p2v.ks.in
+++ b/p2v/p2v.ks.in
@@ -112,8 +112,6 @@ base64 -d > /etc/systemd/system/p2v.service <<EOF
 __BASE64_P2V_SERVICE__
 EOF
 
-systemctl enable p2v.service
-
 # Base64-decoding of virt-p2v binary
 # md5(virt-p2v) = __MD5SUM_VIRT_P2V__
 
@@ -131,6 +129,12 @@ sed -i 's/^ExecStart=\(.*\)/ExecStart=\1 -a root/' \
 # Reserve tty1 as a getty so we can document it clearly
 echo ReserveVT=1 >> /etc/systemd/logind.conf
 
+# Force text mode
+systemctl set-default multi-user.target
+
+# Start p2v service
+systemctl enable p2v.service
+
 %end
 
 %post --nochroot
diff --git a/p2v/p2v.service b/p2v/p2v.service
index c4c8254..a6b5e25 100644
--- a/p2v/p2v.service
+++ b/p2v/p2v.service
@@ -28,4 +28,4 @@ ExecStart=/usr/bin/launch-virt-p2v
 RemainAfterExit=yes
 
 [Install]
-WantedBy=graphical.target
+WantedBy=multi-user.target
diff --git a/p2v/virt-p2v-make-disk.in b/p2v/virt-p2v-make-disk.in
index 28d6e75..316c224 100644
--- a/p2v/virt-p2v-make-disk.in
+++ b/p2v/virt-p2v-make-disk.in
@@ -163,6 +163,7 @@ virt-builder "$osversion"                                       \
     --chmod 0755:/usr/bin/launch-virt-p2v                       \
     --upload "$datadir"/p2v.service:/etc/systemd/system/        \
     --mkdir /etc/systemd/system/default.target.wants            \
+    --link /usr/lib/systemd/system/multi-user.target:/etc/systemd/system/default.target \
     --link /etc/systemd/system/p2v.service:/etc/systemd/system/default.target.wants/p2v.service \
     --edit '/usr/lib/systemd/system/getty at .service:
         s/^ExecStart=(.*)/ExecStart=$1 -a root/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list