- put the root SSH public key in the place where the API expects it to
authorMark Huang <mlhuang@cs.princeton.edu>
Mon, 3 Apr 2006 21:50:29 +0000 (21:50 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Mon, 3 Apr 2006 21:50:29 +0000 (21:50 +0000)
  be
- make SSH public keys readable

guest.init

index 510e4ac..16d6e93 100755 (executable)
@@ -6,7 +6,7 @@
 #
 # description: Manages all PLC services on this machine
 #
-# $Id: guest.init,v 1.9 2006/03/31 00:41:03 mlhuang Exp $
+# $Id: guest.init,v 1.10 2006/04/03 19:47:07 mlhuang Exp $
 #
 
 PATH=/sbin:/bin:/usr/bin:/usr/sbin
@@ -107,6 +107,9 @@ WWW_BASE='$PLC_WWW_HOST'
 BOOT_BASE='$PLC_BOOT_HOST'
 EOF
 
+    # API expects root SSH public key to be at /etc/planetlab/node_root_key
+    ln -sf "$PLC_ROOT_SSH_KEY_PUB" /etc/planetlab/node_root_key
+
     # The format is
     #
     # ip:max_role_id:organization_id:password
@@ -444,7 +447,7 @@ config_ssh ()
                    -b $KEY_LEN_ROOT -t $KEY_TYPE_ROOT -f $tmp/root
                check
                install -D -m 600 $tmp/root $PLC_ROOT_SSH_KEY
-               install -D -m 600 $tmp/root.pub $PLC_ROOT_SSH_KEY_PUB
+               install -D -m 644 $tmp/root.pub $PLC_ROOT_SSH_KEY_PUB
            fi
 
            # Generate debug SSH key
@@ -453,7 +456,7 @@ config_ssh ()
                    -b $KEY_LEN_DEBUG -t $KEY_TYPE_DEBUG -f $tmp/debug
                check
                install -D -m 600 $tmp/debug $PLC_DEBUG_SSH_KEY
-               install -D -m 600 $tmp/debug.pub $PLC_DEBUG_SSH_KEY_PUB
+               install -D -m 644 $tmp/debug.pub $PLC_DEBUG_SSH_KEY_PUB
            fi
 
            rm -rf $tmp