From e1f6ac312332dd69963416f0d9e76c2ae49b801a Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Wed, 15 Jul 2015 11:40:24 +0200 Subject: [PATCH] Add support for Virtuozzo 7 and remove the systemd hack for new OpenVZ legacy kernels https://bugzilla.openvz.org/show_bug.cgi?id=3280 --- vps2arch | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/vps2arch b/vps2arch index b3f2a24..8d80e52 100755 --- a/vps2arch +++ b/vps2arch @@ -212,9 +212,16 @@ configure_network() { finalize() { # OpenVZ hacks if is_openvz; then - # FIXME systemd 220+ doesn't work anymore with OpenVZ! - 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 + local kernelver + read -r _ _ kernelver _ < /proc/version + if [ "$kernelver" '>' '3.10' ]; then + # 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 + fi fi cat <<-EOF