Write a program in Python/C++ to test that computer is booted with Legacy Boot ROMBIOS or UEFI

#!/usr/bin/python
import os.path
out= os.path.exists(" -d /sys/firmware/efi")
if out=="False":
print "System is booted using UEFI";
else:
print "System is booted using BIOS";

#OUTPUT
#[soetcomp@localhost ~]$ gedit rombios.py
#[soetcomp@localhost ~]$ python rombios.py
#System is booted using BIOS
#[soetcomp@localhost ~]$ gedit rombios.py

Comments