This file is indexed.

/usr/share/virt-p2v/p2v.ks.in is in libguestfs-tools 1:1.32.2-4ubuntu2.

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

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# Kickstart file for creating the virt-p2v ISO.
# (C) Copyright 2014-2016 Red Hat Inc.
#
# This program 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.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# Generated by virt-p2v-make-kickstart __PACKAGE_VERSION_FULL__

lang en_US.UTF-8
keyboard us
timezone --utc GMT

rootpw --plaintext p2v

selinux --enforcing
firewall --enabled

# Make sure that systemd doesn't rename the network device.  We have
# to tell Anaconda we're using eth0, *and* we have to pass
# net.ifnames=0 on the kernel command line.
network --bootproto=dhcp --device=eth0
bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH net.ifnames=0"

zerombr
clearpart --all --initlabel
part / --size 3000 --fstype ext4

reboot

# Repository lines:
__REPOS__

# Packages to install in the ISO.  For dependencies, see
# p2v/Makefile.am.  Note that libguestfs is NOT required by virt-p2v.

%packages

@core

# rpm must be installed, else you'll hit RHBZ#1089566.
rpm

# Note you must have a kernel, else the boot menu won't work:
kernel

# This is required in order for RHEL to set the root password.
passwd

# RHEL needs this in order to get networking.
NetworkManager

# Required to run firewall --enabled kickstart command:
firewalld

# Needed by post script to unpack the blobs.
/usr/bin/base64
/usr/bin/gzip

# Work around https://bugzilla.redhat.com/show_bug.cgi?id=1182362
tar

# https://bugzilla.redhat.com/show_bug.cgi?id=1168223
dracut-live

# The dependencies of virt-p2v.
__DEPENDENCIES__

%end

# Post-install configuration.

%post

# Base64-decoding of SSH Identity.

base64 -d > /var/tmp/id_rsa << EOF
__BASE64_SSH_IDENTITY__
EOF
if test -s /var/tmp/id_rsa; then
   chmod 0600 /var/tmp/id_rsa
else
   rm /var/tmp/id_rsa
fi

# Base64-decoding of /etc/issue

base64 -d > /etc/issue << EOF
__BASE64_ISSUE__
EOF

cp /etc/issue /etc/issue.net

# Base64-decoding of launch-virt-p2v

base64 -d > /usr/bin/launch-virt-p2v <<EOF
__BASE64_LAUNCH_VIRT_P2V__
EOF

chmod 0755 /usr/bin/launch-virt-p2v

# Base64-decoding of p2v.service unit file

base64 -d > /etc/systemd/system/p2v.service <<EOF
__BASE64_P2V_SERVICE__
EOF

# Base64-decoding of virt-p2v binary
# md5(virt-p2v) = __MD5SUM_VIRT_P2V__

base64 -d <<EOF | gzip -cd > __LIBEXECDIR__/virt-p2v
__BASE64_VIRT_P2V__
EOF

chmod 0755 __LIBEXECDIR__/virt-p2v

# Update the default getty target to login automatically as root without
# prompting for a password
sed -i 's/^ExecStart=\(.*\)/ExecStart=\1 -a root/' \
    /usr/lib/systemd/system/getty@.service

# Reserve tty1 as a getty so we can document it clearly
echo ReserveVT=1 >> /etc/systemd/logind.conf

# Force text mode
systemctl set-default multi-user.target

# Start p2v service
systemctl enable p2v.service

# Disable ssh service (RHBZ#1248678)
systemctl disable sshd.service

%end

%post --nochroot

PRODUCT='Virt P2V'
PRODUCT_SHORT='virt-p2v'
PACKAGE='__PACKAGE_NAME__'
VERSION='__PACKAGE_VERSION__'

echo "Customizing boot menu"
sed -i -e '
# Put product information at the top of the file
1 {
    i '"say $PRODUCT $VERSION"'
    i '"menu title $PRODUCT_SHORT $VERSION"'
}

# Remove any existing menu title
/^menu title .*/d

# Remove quiet bootparam
#s/ quiet//

# Disable selinux.
#/^\s*append\s/ s/\s*$/ selinux=0/

# Remove Verify and Boot option
#/label check0/{N;N;N;d;}

# Set the default timeout to 60 seconds
s/^timeout .*/timeout 600/
' $LIVE_ROOT/isolinux/isolinux.cfg

# TODO: Replace the splash screen with something P2V appropriate
#cp $INSTALL_ROOT//syslinux-vesa-splash.jpg $LIVE_ROOT/isolinux/splash.jpg

# store image version info in the ISO
cat > $LIVE_ROOT/isolinux/version <<EOF
PRODUCT='$PRODUCT'
PRODUCT_SHORT='${PRODUCT_SHORT}'
#PRODUCT_CODE=$PRODUCT_CODE
#RECIPE_SHA256=$RECIPE_SHA256
#RECIPE_RPM=$RECIPE_RPM
PACKAGE=$PACKAGE
VERSION=$VERSION
EOF

# overwrite user visible banners with the image versioning info
cat > $INSTALL_ROOT/etc/$PACKAGE-release <<EOF
$PRODUCT release $VERSION
EOF
#ln -snf $PACKAGE-release $INSTALL_ROOT/etc/redhat-release
#ln -snf $PACKAGE-release $INSTALL_ROOT/etc/system-release

# replace initramfs if regenerated
if [ -f "$INSTALL_ROOT/initrd0.img" ]; then
  mv -v "$INSTALL_ROOT/initrd0.img" "$LIVE_ROOT/isolinux/initrd0.img"
fi

%end