File: libvirt-daemon-system.config

package info (click to toggle)
libvirt 5.0.0-4+deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 251,264 kB
  • sloc: ansic: 573,843; xml: 168,347; sh: 9,976; python: 4,883; perl: 3,953; makefile: 3,323; ml: 465
file content (34 lines) | stat: -rwxr-xr-x 929 bytes parent folder | download | duplicates (3)
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
29
30
31
32
33
34
#!/bin/sh -e

# Only perform this check/warning if the libvirt user groups aren't there
# already
if getent passwd libvirt-qemu >/dev/null \
&& getent group  libvirt-qemu >/dev/null; then
        exit 0
fi

# Source debconf library.
. /usr/share/debconf/confmodule

# Allocated UID and GID for libvirt-qemu
LIBVIRT_QEMU_UID=64055
LIBVIRT_QEMU_GID=64055

# Check if allocated UID/GID are assigned to a different user/group.
UID_TO_NAME="$(getent passwd $LIBVIRT_QEMU_UID | cut -d: -f1)"
GID_TO_NAME="$(getent group  $LIBVIRT_QEMU_GID | cut -d: -f1)"

if ( [ -n "$UID_TO_NAME" ] && [ "$UID_TO_NAME" != 'libvirt-qemu' ] ) \
|| ( [ -n "$GID_TO_NAME" ] && [ "$GID_TO_NAME" != 'libvirt-qemu' ] ) \
then
	# Ask if the user would like to continue or abort installation.
	db_input high libvirt-daemon-system/id_warning || true
	db_go
	db_get libvirt-daemon-system/id_warning
	if [ "$RET" = "false" ]; then
		exit 1
	fi
fi

db_stop
exit 0