mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
Advance work on EL9 diskless support
This commit is contained in:
parent
94955dd091
commit
e7bea0df45
@ -29,7 +29,6 @@ cp confluent_imginfo copernicus clortho autocons ../opt/confluent/bin
|
||||
cp start_root urlmount ../stateless-bin/
|
||||
cd ..
|
||||
ln -s el8 el9
|
||||
ln -s el8-diskless el9-diskless
|
||||
for os in rhvh4 el7 genesis el8 suse15 ubuntu20.04 ubuntu22.04 coreos el9; do
|
||||
mkdir ${os}out
|
||||
cd ${os}out
|
||||
|
@ -904,7 +904,7 @@ def fingerprint_source_suse(files, sourcepath, args):
|
||||
|
||||
def fingerprint_source_el(files, sourcepath, args):
|
||||
for filen in files:
|
||||
if '-release-8' in filen or '-release-7' in filen:
|
||||
if '-release-8' in filen or '-release-7' in filen or '-release-9' in filen:
|
||||
parts = filen.split('-')
|
||||
osname = '_'.join(parts[:-3])
|
||||
if osname == 'centos_linux':
|
||||
@ -929,6 +929,7 @@ def fingerprint_source(sourcepath, args):
|
||||
return oshandler
|
||||
|
||||
def fingerprint_host_el(args, hostpath='/'):
|
||||
release = ''
|
||||
if hostpath[0] != '/':
|
||||
hostpath = os.path.join(os.getcwd(), hostpath)
|
||||
try:
|
||||
@ -936,7 +937,7 @@ def fingerprint_host_el(args, hostpath='/'):
|
||||
ts = rpm.TransactionSet(hostpath)
|
||||
rpms = ts.dbMatch('provides', 'system-release')
|
||||
for inf in rpms:
|
||||
if 'el8' not in inf.release and 'el7' not in inf.release:
|
||||
if 'el8' not in inf.release and 'el7' not in inf.release and 'el9' not in inf.release:
|
||||
continue
|
||||
osname = inf.name
|
||||
version = inf.version
|
||||
@ -960,7 +961,7 @@ def fingerprint_host_el(args, hostpath='/'):
|
||||
version = v
|
||||
except subprocess.SubprocessError:
|
||||
return None
|
||||
if 'el8' not in release and 'el7' not in release:
|
||||
if 'el8' not in release and 'el7' not in release and 'el9' not in release:
|
||||
return None
|
||||
osname = osname.replace('-release', '').replace('-', '_')
|
||||
if osname == 'centos_linux':
|
||||
@ -1267,6 +1268,11 @@ def gather_bootloader(outdir, rootpath='/'):
|
||||
grubbin = os.path.join(rootpath, 'usr/lib64/efi/grub.efi')
|
||||
if not os.path.exists(grubbin):
|
||||
grubbin = os.path.join(rootpath, 'usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed')
|
||||
if not os.path.exists(grubbin):
|
||||
grubs = os.path.join(rootpath, 'boot/efi/EFI/*/grubx64.efi')
|
||||
grubs = glob.glob(grubs)
|
||||
if len(grubs) == 1:
|
||||
grubbin = grubs[0]
|
||||
shutil.copyfile(grubbin, os.path.join(outdir, 'boot/efi/boot/grubx64.efi'))
|
||||
shutil.copyfile(grubbin, os.path.join(outdir, 'boot/efi/boot/grub.efi'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user