summaryrefslogtreecommitdiffstats
path: root/core/modules/libvirt/module.build
blob: 3672b4c26686018d009a297d6654f9b2c8b55403 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

module_init() {
	local uid gid
	# TODO theye functions suck, make thin wrappers around useradd et al.
	gid="$( add_system_group "kvm" )"
	uid="$( USER="libvirt-qemu" \
		GROUPID="$gid" \
		add_system_user )"
	[ -z "$uid" ] && perror "Could not create libvirt-qemu user"
	(( uid >= 1000 )) && perror "libvirt-qemu user has uid >= 1000"
}

fetch_source() {
	:
}

build() {
	:
}

post_copy() {
	# remove default network configuration
	# TODO: Some REQUIRED_DELETIONS var that handles this? This would not
	# do the right thing in MiniLinux mode.
	rm "/etc/libvirt/qemu/networks/default.xml"
	rm "/etc/libvirt/qemu/networks/autostart/default.xml"
}