mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
fix pub key mngt
This commit is contained in:
parent
74398c099a
commit
4fb2921217
3 changed files with 18 additions and 1 deletions
|
@ -1,5 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Reconfigure host ssh keys"
|
||||
dpkg-reconfigure openssh-server
|
||||
|
||||
if [ ! -e /root/.ssh ]; then
|
||||
mkdir /root/.ssh
|
||||
touch /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
|
||||
echo "Copy public ssh keys to authorized_keys"
|
||||
for f in /mnt/*.pub
|
||||
do
|
||||
|
|
|
@ -21,6 +21,12 @@ class OpenNebulaContext(Task):
|
|||
|
||||
from common.tools import log_check_call
|
||||
log_check_call(['/usr/sbin/chroot', info.root, 'dpkg', '-i', '/tmp/one-context_3.8.1.deb'])
|
||||
# Fix start
|
||||
from common.tools import sed_i
|
||||
vmcontext_def = os.path.join(info.root, 'etc/init.d/vmcontext')
|
||||
sed_i(vmcontext_def, '# Default-Start:', '# Default-Start: 2 3 4 5')
|
||||
os.chmod(vmcontext_def, rwxr_xr_x)
|
||||
log_check_call(['/usr/sbin/chroot', info.root, 'update-rc.d', 'vmcontext', 'start', '90', '2', '3', '4', '5', 'stop', '90', '0', '6'])
|
||||
|
||||
script_src = os.path.normpath(os.path.join(os.path.dirname(__file__), '../assets/one-pubkey.sh'))
|
||||
script_dst = os.path.join(info.root, 'etc/one-context.d/one-pubkey.sh')
|
||||
|
|
|
@ -7,7 +7,7 @@ class HostPackages(Task):
|
|||
phase = phases.preparation
|
||||
|
||||
def run(self, info):
|
||||
packages = set(['debootstrap', 'qemu-utils', 'parted', 'grub2'])
|
||||
packages = set(['debootstrap', 'qemu-utils', 'parted', 'grub2', 'sysv-rc'])
|
||||
if info.manifest.volume['filesystem'] == 'xfs':
|
||||
packages.add('xfsprogs')
|
||||
|
||||
|
@ -31,6 +31,8 @@ class ImagePackages(Task):
|
|||
# isc-dhcp-client doesn't work properly with ec2
|
||||
'dhcpcd',
|
||||
'grub2',
|
||||
'chkconfig',
|
||||
'openssh-client'
|
||||
])
|
||||
|
||||
exclude = set(['isc-dhcp-client',
|
||||
|
|
Loading…
Add table
Reference in a new issue