Files
bpfire/src/paks/libvirt/install.sh
Jonatan Schlag d996e17ab8 Update libvirt to 2.1
This is the update of libvirt to the latest version 2.1.
The most important change from a packager view is the new virtlogd
daemon.
This daemon handles the qemu output and wrote it to log files.

The require some changes:
- A new init script to start, stop restart the daemon called virtlogd.
The daemon is restart with SIGUSR1 (this is important because the daemon
keeps all pipelines etc. open).

This introduces a problem with the uninstall.sh install.sh script.
It is not possible to stop the daemon while virtual machines are
running, so the script update.sh execute from now not uninstall.sh and
install.sh instead it contains all steps from uninstall.sh install.sh
expect the start / stop routine for virtlogd. The daemon is just
restarted after the update, which makes sure that all changes take
effect.

- new symlinks in the uninstall.sh and install.sh script and some root
file changes because of the new virtlogd init script.
- the archive format changes from tar.gz to tar.xz

For Changelogs see:

https://libvirt.org/news-2015.html
https://libvirt.org/news.html (2017 and later:
https://libvirt.org/news-2016.html )

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-08-31 22:40:35 +01:00

62 lines
2.9 KiB
Bash

#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
# creates a new user and group called libvirt-remote if they not exist
getent group libvirt-remote >/dev/null || groupadd libvirt-remote
getent passwd libvirt-remote >/dev/null || \
useradd -m -g libvirt-remote -s /bin/bash "libvirt-remote"
extract_files
# create diretorys in var
mkdir -p /var/cache/libvirt/qemu \
/var/lib/libvirt/boot \
/var/lib/libvirt/filesystems \
/var/lib/libvirt/images \
/var/lib/libvirt/lockd/files \
/var/lib/libvirt/qemu \
/var/log/libvirt/qemu
# set the permissions
chown -R nobody:kvm /var/cache/libvirt/qemu
chown -R nobody:kvm /var/lib/libvirt/qemu
chown -R nobody:kvm /var/lib/libvirt/images
# restore the backup
restore_backup ${NAME}
start_service virtlogd
start_service --background libvirtd
ln -svf /etc/init.d/virtlogd /etc/rc.d/rc0.d/K21virtlogd
ln -svf /etc/init.d/virtlogd /etc/rc.d/rc3.d/S69virtlogd
ln -svf /etc/init.d/virtlogd /etc/rc.d/rc6.d/K21virtlogd
ln -svf /etc/init.d/libvirtd /etc/rc.d/rc0.d/K20libvirtd
ln -svf /etc/init.d/libvirtd /etc/rc.d/rc3.d/S70libvirtd
ln -svf /etc/init.d/libvirtd /etc/rc.d/rc6.d/K20libvirtd
ln -svf /etc/init.d/libvirt-guests /etc/rc.d/rc0.d/K19libvirt-guests
ln -svf /etc/init.d/libvirt-guests /etc/rc.d/rc3.d/S71libvirt-guests
ln -svf /etc/init.d/libvirt-guests /etc/rc.d/rc6.d/K19libvirt-guests