This file is indexed.

/etc/xen/scripts/launch-xenstore is in xen-utils-common 4.9.2-0ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
#
# Copyright (c) 2016 SUSE Linux GmbH
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; If not, see <http://www.gnu.org/licenses/>.
#

XENSTORED=/usr/sbin/xenstored

. /etc/xen/scripts/hotplugpath.sh

test_xenstore () {
	test -f /var/run/xen/xenstored.pid
	return $?
}

timeout_xenstore () {
	local time=0
	local timeout=30

	while [ $time -lt $timeout ] && ! test_xenstore ; do
		echo -n .
		time=$(($time+1))
		sleep 1
	done
	echo
 
	# Exit if we timed out
	if ! [ $time -lt $timeout ] ; then
		echo "Could not start $@"
		return 1
	fi

	return 0
}

test_xenstore && exit 0

test -f /etc/default/xencommons && . /etc/default/xencommons

[ "$XENSTORETYPE" = "" ] && XENSTORETYPE=daemon

/bin/mkdir -p /var/run/xen

[ "$XENSTORETYPE" = "daemon" ] && {
	[ -z "$XENSTORED_ROOTDIR" ] && XENSTORED_ROOTDIR="/var/lib/xenstored"
	[ -z "$XENSTORED_TRACE" ] || XENSTORED_ARGS="$XENSTORED_ARGS -T /var/log/xen/xenstored-trace.log"
	[ -z "$XENSTORED" ] && XENSTORED=/usr/sbin/xenstored
	[ -x "$XENSTORED" ] || {
		echo "No xenstored found"
		exit 1
	}

	echo -n Starting $XENSTORED...
	$XENSTORED --pid-file /var/run/xen/xenstored.pid $XENSTORED_ARGS

	systemd-notify --booted 2>/dev/null || timeout_xenstore $XENSTORED || exit 1

	exit 0
}

[ "$XENSTORETYPE" = "domain" ] && {
	[ -z "$XENSTORE_DOMAIN_KERNEL" ] && XENSTORE_DOMAIN_KERNEL=/usr/lib/xen/boot/xenstore-stubdom.gz
	XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --kernel $XENSTORE_DOMAIN_KERNEL"
	[ -z "$XENSTORE_DOMAIN_SIZE" ] && XENSTORE_DOMAIN_SIZE=8
	XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --memory $XENSTORE_DOMAIN_SIZE"
	[ -z "$XENSTORE_MAX_DOMAIN_SIZE" ] || XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --maxmem $XENSTORE_MAX_DOMAIN_SIZE"

	echo -n Starting $XENSTORE_DOMAIN_KERNEL...
	${LIBEXEC_BIN}/init-xenstore-domain $XENSTORE_DOMAIN_ARGS || exit 1
	systemd-notify --ready 2>/dev/null

	exit 0
}

echo "illegal value $XENSTORETYPE for XENSTORETYPE"
exit 1