23 lines
693 B
Python
23 lines
693 B
Python
#!/usr/bin/python3
|
|
|
|
import sys
|
|
import argparse
|
|
from SystemLib import ogHelp
|
|
from UEFILib import ogNvramInactiveEntry
|
|
|
|
parser = argparse.ArgumentParser (add_help=False)
|
|
parser.add_argument ('entry')
|
|
|
|
if 2 == len (sys.argv) and 'help' == sys.argv[1]:
|
|
#parser.print_help() sale en inglés aunque la locale indique otra cosa
|
|
ogHelp ('ogNvramInactiveEntry', 'ogNvramInactiveEntry [ Num_order_entry | Label_entry ]', ['ogNvramInactiveEntry 2', 'ogNvramInactiveEntry "Windows Boot Manager"'])
|
|
sys.exit (0)
|
|
|
|
args = parser.parse_args()
|
|
|
|
ret = ogNvramInactiveEntry (args.entry)
|
|
if ret is not None:
|
|
if ret == True: sys.exit (0)
|
|
elif ret == False: sys.exit (1)
|
|
else: print (ret)
|