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 if ! test -f "${adt_ssh_pubkey}"; then
15 if [ "x${adt_ssh_pubkey}" != "x${adt_ssh_privkey}.priv" ]; then
16 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>"
18 if test -f "${adt_ssh_privkey}"; then
19 fail "will not overwrite existing private key \`$adt_ssh_privkey' - but where is public key \`$adt_ssh_pubkey' ?"
23 ssh-keygen -N '' ${adt_ssh_keygen_args} -f "${adt_ssh_privkey}"
26 mkdir -m 02700 -p $dest/root/.ssh
27 cp -- "${adt_ssh_pubkey}" $dest/root/.ssh/authorized_keys
29 cat <<END >$dest/etc/init.d/xenethtoolk
31 # work around checksum offload bug in Xen network bridge driver
34 ethtool -K eth0 tx off
35 ethtool -K eth0 rx off
39 chmod +x $dest/etc/init.d/xenethtoolk
40 ln -s ../init.d/xenethtoolk $dest/etc/rc2.d/S21xenethtoolk
42 chroot $dest root/fixups-inside \
43 "$adt_host_hostname" "$adt_guest_hostname" \
44 "$adt_host_ipaddr" "$adt_guest_ipaddr" \
47 kh=/etc/ssh/ssh_known_hosts
48 test ! -f $kh || cp $kh $kh.new
50 pfx="$adt_guest_hostname,$adt_guest_ipaddr"
51 test ! -f $kh || perl -pe '$_="" if m/^(\S+)\s/ && $1 eq "'$pfx'";' $kh >&3
52 for f in $dest/etc/ssh/ssh_host_*_key.pub; do
53 perl -pe '$_= "'$pfx' ".$_;' $f >&3
59 === adt xen fixups done.