FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 12-17-2010, 08:39 PM
"Brian C. Lane"
 
Default noeject overrides kickstart eject (#477887)

When noeject is passed on the command line it should overide any eject
commands in the kickstart file.

Resolves: rhbz#477887
---
anaconda | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/anaconda b/anaconda
index 106928b..ef1c9b6 100755
--- a/anaconda
+++ b/anaconda
@@ -992,8 +992,11 @@ if __name__ == "__main__":
if anaconda.isKickstart and instClass.ksdata.reboot["eject"]:
isys.flushDriveDict()
for drive in isys.cdromList():
- log.info("attempting to eject %s" % drive)
- isys.ejectCdrom(drive)
+ if not anaconda.noeject:
+ log.info("attempting to eject %s" % drive)
+ isys.ejectCdrom(drive)
+ else:
+ log.info("noeject in effect, not ejecting %s" % drive)

del anaconda.intf

--
1.7.3.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-17-2010, 08:56 PM
Chris Lumens
 
Default noeject overrides kickstart eject (#477887)

> diff --git a/anaconda b/anaconda
> index 106928b..ef1c9b6 100755
> --- a/anaconda
> +++ b/anaconda
> @@ -992,8 +992,11 @@ if __name__ == "__main__":
> if anaconda.isKickstart and instClass.ksdata.reboot["eject"]:
> isys.flushDriveDict()
> for drive in isys.cdromList():
> - log.info("attempting to eject %s" % drive)
> - isys.ejectCdrom(drive)
> + if not anaconda.noeject:
> + log.info("attempting to eject %s" % drive)
> + isys.ejectCdrom(drive)
> + else:
> + log.info("noeject in effect, not ejecting %s" % drive)
>
> del anaconda.intf

Just to be terribly picky, it'd be easier to read this without the
double negative:

if anaconda.noeject:
log.info("noeject in effect...")
else:
log.info("attempting...")
isys.ejectCdrom(drive)

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-17-2010, 09:43 PM
"Brian C. Lane"
 
Default noeject overrides kickstart eject (#477887)

On Fri, Dec 17, 2010 at 04:56:15PM -0500, Chris Lumens wrote:
> > diff --git a/anaconda b/anaconda
> > index 106928b..ef1c9b6 100755
> > --- a/anaconda
> > +++ b/anaconda
> > @@ -992,8 +992,11 @@ if __name__ == "__main__":
> > if anaconda.isKickstart and instClass.ksdata.reboot["eject"]:
> > isys.flushDriveDict()
> > for drive in isys.cdromList():
> > - log.info("attempting to eject %s" % drive)
> > - isys.ejectCdrom(drive)
> > + if not anaconda.noeject:
> > + log.info("attempting to eject %s" % drive)
> > + isys.ejectCdrom(drive)
> > + else:
> > + log.info("noeject in effect, not ejecting %s" % drive)
> >
> > del anaconda.intf
>
> Just to be terribly picky, it'd be easier to read this without the
> double negative:
>
> if anaconda.noeject:
> log.info("noeject in effect...")
> else:
> log.info("attempting...")
> isys.ejectCdrom(drive)

Good point.

--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 08:01 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org