mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
Switch to tar
esxi seems to be inconsistent with working with gz compressed tar, see if plain tar fares better
This commit is contained in:
parent
d4f46a53e0
commit
c6d0c121d4
@ -39,8 +39,8 @@ cd esxi7out
|
||||
cp -a ../opt .
|
||||
cp -a ../esxi7/initramfs/* .
|
||||
chmod +x bin/* opt/confluent/bin/*
|
||||
tar zcvf ../addons.tgz *
|
||||
mv ../addons.tgz .
|
||||
tar cf ../addons.tar *
|
||||
mv ../addons.tar .
|
||||
cd ..
|
||||
|
||||
%install
|
||||
|
@ -137,11 +137,11 @@ def initialize(cmdset):
|
||||
sys.stderr.write('Error occurred while packing site initramfs')
|
||||
sys.exit(1)
|
||||
os.rename(tmpname, '/var/lib/confluent/public/site/initramfs.cpio')
|
||||
tmptarname = tmpname.replace('cpio', 'tgz')
|
||||
tarcmd = ['tar', '--transform=s|^|etc/|', '-czf', tmptarname] + topack
|
||||
tmptarname = tmpname.replace('cpio', 'tar')
|
||||
tarcmd = ['tar', '--transform=s|^|etc/|', '-cf', tmptarname] + topack
|
||||
subprocess.check_call(tarcmd)
|
||||
os.chdir(opath)
|
||||
os.rename(tmptarname, '/var/lib/confluent/public/site/initramfs.tgz')
|
||||
os.rename(tmptarname, '/var/lib/confluent/public/site/initramfs.tar')
|
||||
if cmdset.k:
|
||||
with open('/etc/ssh/ssh_known_hosts', 'a+b') as skh:
|
||||
for cafile in glob.glob('/var/lib/confluent/public/site/ssh/*.ca'):
|
||||
|
@ -71,14 +71,14 @@ def update_boot_esxi(profiledir, profile, label):
|
||||
elif cfgline.startswith('modules='):
|
||||
modlist = cfgline.split('=', 1)[1]
|
||||
filesneeded.extend(modlist.split(' --- '))
|
||||
newbootcfg += cfgline + ' --- /initramfs/addons.tgz --- /site.tgz\n'
|
||||
newbootcfg += cfgline + ' --- /initramfs/addons.tar --- /site.tar\n'
|
||||
else:
|
||||
newbootcfg += cfgline + '\n'
|
||||
os.makedirs('{0}/boot/efi/boot/'.format(profiledir))
|
||||
with open('{0}/boot/efi/boot/BOOT.CFG'.format(profiledir), 'w+') as bcfg:
|
||||
bcfg.write(newbootcfg)
|
||||
os.symlink('/var/lib/confluent/public/site/initramfs.tgz',
|
||||
'{0}/boot/site.tgz'.format(profiledir))
|
||||
os.symlink('/var/lib/confluent/public/site/initramfs.tar',
|
||||
'{0}/boot/site.tar'.format(profiledir))
|
||||
for fn in filesneeded:
|
||||
if fn.startswith('/'):
|
||||
fn = fn[1:]
|
||||
|
Loading…
Reference in New Issue
Block a user