From 17cd27524e781aa3e9b15530790db7c511e6fe76 Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Fri, 17 Jul 2015 12:41:08 +0200 Subject: [PATCH] Use my repository for OpenVZ-patched systemd --- README.md | 3 --- vps2arch | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 88098d0..b5bda36 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,3 @@ Caveats ------- _IPv6_ currently is not supported. If you need to use it, please configure it manually. - -[OpenVZ](http://openvz.org/) and [Virtuozzo](http://www.odin.com/products/virtuozzo/) are **partially** supported. -The script works fine, but _systemd_ will be blocked on version 219, because newer systemd versions doesn't work anymore on OpenVZ containers. diff --git a/vps2arch b/vps2arch index e9369ee..0333312 100755 --- a/vps2arch +++ b/vps2arch @@ -88,6 +88,11 @@ configure_chroot() { # Generate fstab chroot_exec 'genfstab /mnt >> /etc/fstab' + + if is_openvz && [ "$kernelver" '<' '2.6.32-042stab111.1' ]; then + # Use my repository for OpenVZ-patched systemd + sed -i 's;^#\[testing\]$;[tredaelli-systemd]\nServer = http://pkgbuild.com/~tredaelli/repo/systemd/$arch\n\n&;' "/root.$cpu_type/etc/pacman.conf" + fi } save_root_pass() { @@ -231,9 +236,8 @@ finalize() { # Virtuozzo 7 works with systemd, but it needs /etc/resolvconf/resolv.conf.d directory mkdir -p /etc/resolvconf/resolv.conf.d elif [ "$kernelver" '<' '2.6.32-042stab111.1' ]; then - # systemd 220+ doesn't work with old OpenVZ legacy kernels! - pacman --noconfirm -U "http://seblu.net/a/arm/all/systemd-219-6-$cpu_type.pkg.tar.xz" - sed -i 's/^\([[:space:]]*\)#IgnorePkg\([[:space:]]*\)=$/\1IgnorePkg\2= systemd/' /etc/pacman.conf + # Use my repository for OpenVZ-patched systemd + sed -i 's;^#\[testing\]$;[tredaelli-systemd]\nServer = http://pkgbuild.com/~tredaelli/repo/systemd/$arch\n\n&;' /etc/pacman.conf fi fi