3 . ${ADT_XENLVM_SHARE:=/usr/share/autopkgtest/xenlvm}/readconfig
9 cp ${ADT_XENLVM_SHARE}/fixups-inside $dest/root/
11 mkdir -p $dest/lib/modules
12 cp -a "${adt_modules}" $dest/lib/modules/.
14 echo xennet >>$dest/etc/modules
16 if ! test -f "${adt_ssh_pubkey}"; then
17 if [ "x${adt_ssh_pubkey}" != "x${adt_ssh_privkey}.priv" ]; then
18 fail "cannot generate keypair automatically because adt_ssh_privkey \`$adt_ssh_privkey' and adt_ssh_pubkey \`$adt_ssh_pubkey' do not match up in the way required by ssh-keygen (<pubkey> must be <privkey>.pub>"
20 if test -f "${adt_ssh_privkey}"; then
21 fail "will not overwrite existing private key \`$adt_ssh_privkey' - but where is public key \`$adt_ssh_pubkey' ?"
25 ssh-keygen -N '' ${adt_ssh_keygen_args} -f "${adt_ssh_privkey}"
28 mkdir -m 02700 -p $dest/root/.ssh
29 cp -- "${adt_ssh_pubkey}" $dest/root/.ssh/authorized_keys
31 cat <<END >$dest/etc/init.d/xenethtoolk
33 # work around checksum offload bug in Xen network bridge driver
36 ethtool -K eth0 tx off
37 ethtool -K eth0 rx off
41 chmod +x $dest/etc/init.d/xenethtoolk
42 ln -s ../init.d/xenethtoolk $dest/etc/rc2.d/S21xenethtoolk
44 chroot $dest root/fixups-inside \
45 "$adt_host_hostname" "$adt_guest_hostname" \
46 "$adt_host_ipaddr" "$adt_guest_ipaddr" \
49 kh=/etc/ssh/ssh_known_hosts
50 test ! -f $kh || cp $kh $kh.new
52 pfx="$adt_guest_hostname,$adt_guest_ipaddr"
53 test ! -f $kh || perl -pe '$_="" if m/^(\S+)\s/ && $1 eq "'$pfx'";' $kh >&3
54 for f in $dest/etc/ssh/ssh_host_*_key.pub; do
55 perl -pe '$_= "'$pfx' ".$_;' $f >&3
61 === adt xen fixups done.