- if anaconda.ksdata and anaconda.ksdata.reboot.eject:
- for drive in anaconda.storage.devicetree.devices:
- if drive.type != "cdrom":
- continue
-
- log.info("attempting to eject %s" % drive.path)
- drive.eject()
+ if "nokill" in flags.cmdline:
+ isys.vtActivate(1)
+ print "anaconda halting due to nokill flag."
+ print "The system will be rebooted when you press Ctrl-Alt-Delete."
+ while True:
+ time.sleep(10000)
- del anaconda.intf
+ if anaconda.ksdata:
+ from pykickstart.constants import KS_SHUTDOWN, KS_WAIT, KS_REBOOT
+
+ if anaconda.ksdata.reboot.eject:
+ for drive in anaconda.storage.devicetree.devices:
+ if drive.type != "cdrom":
+ continue
+
+ log.info("attempting to eject %s" % drive.path)
+ drive.eject()
+
+ if anaconda.ksdata.reboot.action == KS_SHUTDOWN:
+ os.system("systemctl --force --no-wall poweroff")
+ elif anaconda.ksdata.reboot.action == KS_WAIT:
+ os.system("systemctl --force --no-wall halt")
+ elif anaconda.ksdata.reboot.action == KS_REBOOT:
+ os.system("systemctl --force --no-wall reboot")
+ else:
+ os.system("systemctl --force --no-wall reboot")
# vim:tw=78:ts=4:et:sw=4
--
1.7.4.1
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list