2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 02:52:07 +00:00

Revert "Switch to tar"

This reverts commit c6d0c121d4.
This commit is contained in:
Jarrod Johnson 2020-06-10 10:17:54 -04:00
parent c6d0c121d4
commit facba645c5
3 changed files with 8 additions and 8 deletions

View File

@ -39,8 +39,8 @@ cd esxi7out
cp -a ../opt .
cp -a ../esxi7/initramfs/* .
chmod +x bin/* opt/confluent/bin/*
tar cf ../addons.tar *
mv ../addons.tar .
tar zcvf ../addons.tgz *
mv ../addons.tgz .
cd ..
%install

View File

@ -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', 'tar')
tarcmd = ['tar', '--transform=s|^|etc/|', '-cf', tmptarname] + topack
tmptarname = tmpname.replace('cpio', 'tgz')
tarcmd = ['tar', '--transform=s|^|etc/|', '-czf', tmptarname] + topack
subprocess.check_call(tarcmd)
os.chdir(opath)
os.rename(tmptarname, '/var/lib/confluent/public/site/initramfs.tar')
os.rename(tmptarname, '/var/lib/confluent/public/site/initramfs.tgz')
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'):

View File

@ -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.tar --- /site.tar\n'
newbootcfg += cfgline + ' --- /initramfs/addons.tgz --- /site.tgz\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.tar',
'{0}/boot/site.tar'.format(profiledir))
os.symlink('/var/lib/confluent/public/site/initramfs.tgz',
'{0}/boot/site.tgz'.format(profiledir))
for fn in filesneeded:
if fn.startswith('/'):
fn = fn[1:]