From 3720627e8863fcd5abeeca529f7b0709e6365cc4 Mon Sep 17 00:00:00 2001 From: nl6720 Date: Mon, 29 Jun 2020 20:23:00 +0300 Subject: [PATCH] Enable systemd units with symlinks instead of doing it via systemctl in chroot --- .../etc/systemd/system/dbus-org.freedesktop.network1.service | 1 + .../etc/systemd/system/dbus-org.freedesktop.resolve1.service | 1 + configs/releng/airootfs/etc/systemd/system/default.target | 1 + .../system/multi-user.target.wants/choose-mirror.service | 1 + .../systemd/system/multi-user.target.wants/pacman-init.service | 1 + .../system/multi-user.target.wants/systemd-networkd.service | 1 + .../system/multi-user.target.wants/systemd-resolved.service | 1 + .../systemd-networkd-wait-online.service | 1 + .../system/sockets.target.wants/systemd-networkd.socket | 1 + configs/releng/airootfs/root/customize_airootfs.sh | 3 --- 10 files changed, 9 insertions(+), 3 deletions(-) create mode 120000 configs/releng/airootfs/etc/systemd/system/dbus-org.freedesktop.network1.service create mode 120000 configs/releng/airootfs/etc/systemd/system/dbus-org.freedesktop.resolve1.service create mode 120000 configs/releng/airootfs/etc/systemd/system/default.target create mode 120000 configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/choose-mirror.service create mode 120000 configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service create mode 120000 configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service create mode 120000 configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service create mode 120000 configs/releng/airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service create mode 120000 configs/releng/airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket diff --git a/configs/releng/airootfs/etc/systemd/system/dbus-org.freedesktop.network1.service b/configs/releng/airootfs/etc/systemd/system/dbus-org.freedesktop.network1.service new file mode 120000 index 0000000..4c158e6 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/system/dbus-org.freedesktop.network1.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-networkd.service \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/system/dbus-org.freedesktop.resolve1.service b/configs/releng/airootfs/etc/systemd/system/dbus-org.freedesktop.resolve1.service new file mode 120000 index 0000000..4f6ae34 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/system/dbus-org.freedesktop.resolve1.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-resolved.service \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/system/default.target b/configs/releng/airootfs/etc/systemd/system/default.target new file mode 120000 index 0000000..d321622 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/system/default.target @@ -0,0 +1 @@ +/usr/lib/systemd/system/multi-user.target \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/choose-mirror.service b/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/choose-mirror.service new file mode 120000 index 0000000..2d8d256 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/choose-mirror.service @@ -0,0 +1 @@ +../choose-mirror.service \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service b/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service new file mode 120000 index 0000000..d09eec6 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service @@ -0,0 +1 @@ +../pacman-init.service \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service b/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service new file mode 120000 index 0000000..4c158e6 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/systemd-networkd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-networkd.service \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service b/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service new file mode 120000 index 0000000..4f6ae34 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/systemd-resolved.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-resolved.service \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service b/configs/releng/airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service new file mode 120000 index 0000000..7d6ad92 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-networkd-wait-online.service \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket b/configs/releng/airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket new file mode 120000 index 0000000..51942c8 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/system/sockets.target.wants/systemd-networkd.socket @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-networkd.socket \ No newline at end of file diff --git a/configs/releng/airootfs/root/customize_airootfs.sh b/configs/releng/airootfs/root/customize_airootfs.sh index 5ea4a8b..10fc477 100755 --- a/configs/releng/airootfs/root/customize_airootfs.sh +++ b/configs/releng/airootfs/root/customize_airootfs.sh @@ -15,6 +15,3 @@ passwd -d root sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist - -systemctl enable pacman-init.service choose-mirror.service systemd-networkd.service systemd-resolved.service -systemctl set-default multi-user.target