View | Details | Raw Unified | Return to bug 19145
Collapse All | Expand All

(-)a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/conffiles/etc/default/libvirt-bin (-1 / +1 lines)
 Lines 4-10    Link Here 
4
# This is a POSIX shell fragment
4
# This is a POSIX shell fragment
5
5
6
# Start libvirtd to handle qemu/kvm:
6
# Start libvirtd to handle qemu/kvm:
7
start_libvirtd="no" # handled by /etc/service/univention-libvirt
7
start_libvirtd="yes"
8
8
9
# options passed to libvirtd, add "-l" to listen on tcp
9
# options passed to libvirtd, add "-l" to listen on tcp
10
libvirtd_opts="-d -l"
10
libvirtd_opts="-d -l"
(-)a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/changelog (+6 lines)
 Lines 1-3    Link Here 
1
univention-virtual-machine-manager-node (1.0.2-1) unstable; urgency=low
2
3
  * Drop runit wrapper for libvirt-bin (Bug #19145)
4
5
 -- Philipp Hahn <hahn@univention.de>  Tue, 01 Nov 2011 18:46:11 +0100
6
1
univention-virtual-machine-manager-node (1.0.1-2) unstable; urgency=low
7
univention-virtual-machine-manager-node (1.0.1-2) unstable; urgency=low
2
8
3
  * Added dependency to univention-directory-manager-tools (Bug #23342)
9
  * Added dependency to univention-directory-manager-tools (Bug #23342)
(-)a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/control (+1 lines)
 Lines 11-16   Homepage: http://www.univention.de/ Link Here 
11
11
12
Package: univention-virtual-machine-manager-node-common
12
Package: univention-virtual-machine-manager-node-common
13
Architecture: all
13
Architecture: all
14
Pre-Depends: dpkg (>= 1.15.7.2)
14
Depends: ${misc:Depends},
15
Depends: ${misc:Depends},
15
 univention-directory-manager-tools (>> 7.0.147),
16
 univention-directory-manager-tools (>> 7.0.147),
16
 libvirt-bin,
17
 libvirt-bin,
(-)a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/rules (-3 lines)
 Lines 41-49   override_dh_auto_install: Link Here 
41
	touch debian/univention-virtual-machine-manager-node-common/etc/runit/univention-libvirt/down
41
	touch debian/univention-virtual-machine-manager-node-common/etc/runit/univention-libvirt/down
42
	dh_auto_install
42
	dh_auto_install
43
43
44
override_dh_installinit:
45
	dh_installinit --no-restart-on-upgrade
46
47
override_dh_auto_clean:
44
override_dh_auto_clean:
48
	$(RM) debian/univention-virtual-machine-manager-node-*{pre,post}{inst,rm}.debhelper
45
	$(RM) debian/univention-virtual-machine-manager-node-*{pre,post}{inst,rm}.debhelper
49
	$(RM) debian/univention-virtual-machine-manager-node-*.conffiles
46
	$(RM) debian/univention-virtual-machine-manager-node-*.conffiles
(-)a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.init (-86 lines)
 Lines 1-86    Link Here 
1
#!/bin/sh
2
#
3
# Univention libvirt
4
#  init script for libvirtd
5
#
6
# Copyright 2010 Univention GmbH
7
#
8
# http://www.univention.de/
9
#
10
# All rights reserved.
11
#
12
# The source code of this program is made available
13
# under the terms of the GNU Affero General Public License version 3
14
# (GNU AGPL V3) as published by the Free Software Foundation.
15
#
16
# Binary versions of this program provided by Univention to you as
17
# well as other copyrighted, protected or trademarked materials like
18
# Logos, graphics, fonts, specific documentations and configurations,
19
# cryptographic keys etc. are subject to a license agreement between
20
# you and Univention and not subject to the GNU AGPL V3.
21
#
22
# In the case you use this program under the terms of the GNU AGPL V3,
23
# the program is provided in the hope that it will be useful,
24
# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
# GNU Affero General Public License for more details.
27
#
28
# You should have received a copy of the GNU Affero General Public
29
# License with the Debian GNU/Linux or Univention distribution in file
30
# /usr/share/common-licenses/AGPL-3; if not, see
31
# <http://www.gnu.org/licenses/>.
32
33
if [ ! -e /etc/runit/univention/univention-libvirt ]
34
then
35
	exit 0
36
fi
37
38
. /lib/lsb/init-functions
39
40
case "$1" in
41
	start)
42
		# check ucr autostart setting
43
		if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ]
44
		then
45
			. "/usr/share/univention-config-registry/init-autostart.lib"
46
			check_autostart univention-libvirt libvirt/autostart
47
		fi
48
		log_action_msg "Starting univention-libvirt daemon:"
49
		sv up univention-libvirt
50
		log_action_end_msg 0
51
		;;
52
	stop)
53
		log_action_msg "Stopping univention-libvirt daemon: "
54
		sv down univention-libvirt
55
		log_action_end_msg 0
56
		;;
57
	restart|force-reload)
58
		# check ucr autostart setting
59
		if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ]
60
		then
61
			. "/usr/share/univention-config-registry/init-autostart.lib"
62
			check_autostart univention-libvirt libvirt/autostart
63
		fi
64
		log_action_msg "Restarting univention-libvirt daemon: "
65
		sv restart univention-libvirt
66
		log_action_end_msg 0
67
		;;
68
	crestart)
69
		# check ucr autostart setting
70
		if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ]
71
		then
72
			. "/usr/share/univention-config-registry/init-autostart.lib"
73
			check_autostart univention-libvirt libvirt/autostart
74
		fi
75
		if sv status univention-libvirt | grep -q -s ^run:
76
		then
77
			"$0" restart
78
		else
79
			log_action_msg "sv status return no running libvirt, don't need to restart."
80
		fi
81
		;;
82
	*)
83
		log_action_msg "Usage: $0 {start|stop|restart|crestart|force-reload}"
84
		exit 1
85
		;;
86
esac
(-)a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postinst (-6 / +14 lines)
 Lines 3-9    Link Here 
3
# UCS Virtual Machine Manager Node Common
3
# UCS Virtual Machine Manager Node Common
4
#  postinst script
4
#  postinst script
5
#
5
#
6
# Copyright 2010 Univention GmbH
6
# Copyright 2010-2011 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
 Lines 34-39   eval "$(univention-config-registry shell server/role)" Link Here 
34
34
35
univention-config-registry set "uvmm/backup/directory?/var/backups/univention-virtual-machine-manager-daemon"
35
univention-config-registry set "uvmm/backup/directory?/var/backups/univention-virtual-machine-manager-daemon"
36
36
37
#DEBHELPER#
38
37
case "$1" in
39
case "$1" in
38
    configure)
40
    configure)
39
	if [ "$server_role" = "domaincontroller_master" -o "$server_role" = "domaincontroller_backup" ]; then
41
	if [ "$server_role" = "domaincontroller_master" -o "$server_role" = "domaincontroller_backup" ]; then
 Lines 55-63   case "$1" in Link Here 
55
		fi
57
		fi
56
	fi
58
	fi
57
	invoke-rc.d univention-directory-listener restart
59
	invoke-rc.d univention-directory-listener restart
58
	update-rc.d -f libvirt-bin remove
60
	# Rename back to libvirt-bin
59
	test -e /etc/runit/univention/univention-libvirt || \
61
	if dpkg --compare-versions "$2" lt-nl 1.0.2
60
		ln -s ../univention-libvirt /etc/runit/univention/univention-libvirt
62
	then
63
		[ -L /etc/runit/univention/univention-libvirt ] && rm -f /etc/runit/univention/univention-libvirt
64
		dpkg-maintscript-helper rm_conffile /etc/init.d/univention-virtual-machine-manager-node-common 1.0.2 -- "$@"
65
		dpkg-trigger univention-config-wrapper # univention-config-registry update
66
		update-rc.d -f univention-virtual-machine-manager-node-common remove >/dev/null
67
		update-rc.d -f libvirt-bin remove >/dev/null
68
		update-rc.d libvirt-bin defaults 28 72 >/dev/null
69
		invoke-rc.d libvirt-bin start
70
	fi
61
    ;;
71
    ;;
62
72
63
    abort-upgrade|abort-remove|abort-deconfigure)
73
    abort-upgrade|abort-remove|abort-deconfigure)
 Lines 69-74   case "$1" in Link Here 
69
    ;;
79
    ;;
70
esac
80
esac
71
81
72
#DEBHELPER#
73
74
exit 0
82
exit 0
(-)a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postrm (-3 / +8 lines)
 Lines 1-9    Link Here 
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# UCS Virtual Machine Manager Node
3
# UCS Virtual Machine Manager Node
4
#  postinst script
4
#  postrm script
5
#
5
#
6
# Copyright 2010 Univention GmbH
6
# Copyright 2010-2011 Univention GmbH
7
#
7
#
8
# http://www.univention.de/
8
# http://www.univention.de/
9
#
9
#
 Lines 33-39    Link Here 
33
33
34
case "$1" in
34
case "$1" in
35
    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
35
    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
36
	invoke-rc.d univention-directory-listener restart
36
		invoke-rc.d univention-directory-listener restart
37
    ;;
37
    ;;
38
38
39
    *)
39
    *)
 Lines 41-46   case "$1" in Link Here 
41
        exit 1
41
        exit 1
42
    ;;
42
    ;;
43
esac
43
esac
44
case "$1" in
45
remove|abort-install|disappear)
46
	dpkg-maintscript-helper rm_conffile /etc/init.d/univention-virtual-machine-manager-node-common 1.0.2 -- "$@"
47
	;;
48
esac
44
49
45
#DEBHELPER#
50
#DEBHELPER#
46
51
(-)a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.preinst (+46 lines)
Line 0    Link Here 
1
#!/bin/sh
2
#
3
# UCS Virtual Machine Manager Node Common
4
#  preinst script
5
#
6
# Copyright 2010-2011 Univention GmbH
7
#
8
# http://www.univention.de/
9
#
10
# All rights reserved.
11
#
12
# The source code of this program is made available
13
# under the terms of the GNU Affero General Public License version 3
14
# (GNU AGPL V3) as published by the Free Software Foundation.
15
#
16
# Binary versions of this program provided by Univention to you as
17
# well as other copyrighted, protected or trademarked materials like
18
# Logos, graphics, fonts, specific documentations and configurations,
19
# cryptographic keys etc. are subject to a license agreement between
20
# you and Univention and not subject to the GNU AGPL V3.
21
#
22
# In the case you use this program under the terms of the GNU AGPL V3,
23
# the program is provided in the hope that it will be useful,
24
# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
# GNU Affero General Public License for more details.
27
#
28
# You should have received a copy of the GNU Affero General Public
29
# License with the Debian GNU/Linux or Univention distribution in file
30
# /usr/share/common-licenses/AGPL-3; if not, see
31
# <http://www.gnu.org/licenses/>.
32
33
case "$1" in
34
install|upgrade)
35
	# Rename back to libvirt-bin
36
	if dpkg --compare-versions "$2" lt-nl 1.0.2
37
	then
38
		invoke-rc.d univention-virtual-machine-manager-node-common stop
39
	fi
40
	dpkg-maintscript-helper rm_conffile /etc/init.d/univention-virtual-machine-manager-node-common 1.0.2 -- "$@"
41
	;;
42
esac
43
44
#DEBHELPER#
45
46
exit 0
(-)a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/libvirtd-acl.py (-2 / +1 lines)
 Lines 101-107   def postrun(): Link Here 
101
		listener.setuid(0)
101
		listener.setuid(0)
102
		try:
102
		try:
103
			# "libvirtd reload" only reloads the driver state, not the config file!
103
			# "libvirtd reload" only reloads the driver state, not the config file!
104
			ret = subprocess.call(['invoke-rc.d', 'univention-virtual-machine-manager-node-common', 'restart'])
104
			ret = subprocess.call(['invoke-rc.d', 'libvirt-bin', 'restart'])
105
			need_restart = False
105
			need_restart = False
106
		finally:
106
		finally:
107
			listener.unsetuid()
107
			listener.unsetuid()
108
- 

Return to bug 19145