New package libvirt

Libvirt is buidl only on i585 and x86_64 because qemu is build only
on this arches.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Jonatan Schlag
2016-05-07 16:01:13 +02:00
committed by Michael Tremer
parent 15c80cec1b
commit 272ac1b454
11 changed files with 554 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/libvirtd
#
# Description : libvirtd init script
#
# Authors : Jonatan Schlag - jonatan.schlag@ipfire.org
#
# Version : 01.00
#
# Notes :
#
########################################################################
. /etc/sysconfig/rc
. $rc_functions
case $1 in
start)
boot_mesg "Load required kernel modules for Libvirt"
modprobe tun
evaluate_retval
boot_mesg "Starting Libvirt Daemon..."
loadproc /usr/sbin/libvirtd -d
;;
stop)
boot_mesg "Stopping Libvirt Daemon..."
killproc /usr/sbin/libvirtd
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/libvirtd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/libvirtd

View File

@@ -0,0 +1,33 @@
#!/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
extract_files
start_service --delay 300 --background ${NAME}
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

View File

@@ -0,0 +1,30 @@
#!/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
stop_service ${NAME}
remove_files
rm -f /etc/rc.d/rc*.d/*libvirt-guests
rm -f /etc/rc.d/rc*.d/*libvirtd

View File

@@ -0,0 +1,27 @@
#!/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
./uninstall.sh
./install.sh

View File

@@ -0,0 +1,30 @@
From a50fa0195e36773d57593006152828ce2c0523fd Mon Sep 17 00:00:00 2001
From: Jonatan Schlag <jonatan.schlag@ipfire.org>
Date: Fri, 6 May 2016 11:38:08 +0200
Subject: [PATCH] Change default behavior of libvirt-guests.sh for IPFire
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
---
tools/libvirt-guests.sh.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in
index 7f74b85..87aceb7 100644
--- a/tools/libvirt-guests.sh.in
+++ b/tools/libvirt-guests.sh.in
@@ -30,9 +30,9 @@ test ! -r "$sysconfdir"/rc.d/init.d/functions ||
export TEXTDOMAIN="@PACKAGE@" TEXTDOMAINDIR="@localedir@"
-URIS=default
-ON_BOOT=start
-ON_SHUTDOWN=suspend
+URIS=qemu:///system
+ON_BOOT=ignore
+ON_SHUTDOWN=shutdown
SHUTDOWN_TIMEOUT=300
PARALLEL_SHUTDOWN=0
START_DELAY=0
--
2.1.4