chiark / gitweb /
Fix filename pattern bug which can prevent automatic keypair generation (false claim...
authorIan Jackson <ian@davenant.greenend.org.uk>
Tue, 3 Jul 2007 13:56:29 +0000 (14:56 +0100)
committerIan Jackson <ian@davenant.greenend.org.uk>
Tue, 3 Jul 2007 13:56:29 +0000 (14:56 +0100)
xen/README
xen/fixups
xen/readconfig.in

index 878b626d762c132892e35a8ca33fd691806031f6..02b1cc431fa3b817c5dcf6c91da28258f40bcfd7 100644 (file)
@@ -116,9 +116,14 @@ adt_fw_allowglobalports    <none>
        outgoing connections.
 
 adt_fw_hook            <config> with _config replaced with _fwhook
-                        or none of <config> doesn't end in _config
+                        or none if <config> doesn't end in _config
        bash fragment to source during firewall setup
 
+adt_sshauthkeys_hook   <config> with _config replaced with _sshauthkeys
+                        or none if <config> doesn't end in _config
+       list of authorized keys to append to testbed's
+       /root/.ssh/authorized_keys.
+
 ---------- Items that are likely to need attention ----------
 
 adt_kernel             Xen kernel matching /boot/xen*`uname -r`
index 6c488662bc1abdcb67467d4575de3a17d0aa301b..151e266bd6cebd051a578a21ce7f371215c5e3f6 100755 (executable)
@@ -14,7 +14,7 @@ cp -a "${adt_modules}" $dest/lib/modules/.
 echo xennet >>$dest/etc/modules
 
 if ! test -f "${adt_ssh_pubkey}"; then
-       if [ "x${adt_ssh_pubkey}" != "x${adt_ssh_privkey}.priv" ]; then
+       if [ "x${adt_ssh_pubkey}" != "x${adt_ssh_privkey}.pub" ]; then
                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>"
        fi
        if test -f "${adt_ssh_privkey}"; then
@@ -27,6 +27,9 @@ fi
 
 mkdir -m 02700 -p $dest/root/.ssh
 cp -- "${adt_ssh_pubkey}" $dest/root/.ssh/authorized_keys
+if [ "x$adt_sshauthkeys_hook" != x ]; then
+       cat -- "$adt_sshauthkeys_hook" >>$dest/root/.ssh/authorized_keys
+fi
 
 cat <<END >$dest/etc/init.d/xenethtoolk
 #!/bin/sh
index a30c1cabf36eda21a5164f3f61c934a1f038e3f6..efb8423af937e674d63e379f4f479241698ccf96 100644 (file)
@@ -259,6 +259,7 @@ search_hook () {
 
 search_hook fw firewall fwhook
 search_hook setup setup setuphook
+search_hook sshauthkeys "ssh auth keys" sshauthkeys
 
 boolean_config () {
   eval '