[Fedora-livecd-list] Can't echo to console from dracut module

John.Florian at dart.biz John.Florian at dart.biz
Wed Mar 13 12:57:08 UTC 2013


> From: John.Florian at dart.biz
> 
> > From: "Brian C. Lane" <bcl at redhat.com> 
> > 
> > On Fri, Mar 08, 2013 at 02:55:40PM -0500, John.Florian at dart.biz wrote:
> > > I have a custom dracut module installed as a pre-mount hook (for 
Fedora 
> > > 18).  This shell script needs to echo some messages to the console, 
but 
> > > I'm having no luck making that happen.  I've tried:
> > 
> > This is similar to what we ran into with checkisomd5, now that 
systemctl
> > is being used by dracut you need to setup a service with access to the
> > console in order for anything to be output (or input).
> > 
> > The service file for that looks like this:
> > 
> > [Unit]
> > Description=Media check on %f
> > DefaultDependencies=no
> > Before=shutdown.target
> > 
> > [Service]
> > Type=oneshot
> > RemainAfterExit=no
> > ExecStart=/bin/checkisomd5 --verbose %f
> > StandardInput=tty-force
> > StandardOutput=inherit
> > StandardError=inherit
> > TimeoutSec=0
> > 
> > You can look at commits 040f3883 and 5204d1d3 in dracut to see how it 
is
> > setup.
> > 
> > -- 
> > Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, 
> > WA (PST8PDT)
> 
> 
> Thanks for that Brian!  I had pretty much came to that conclusion 
> before calling it a day on Friday, but it's very helpful to know 
> that the effort to go that route won't be wasted. 
> 
> --
> John Florian 


I just wanted to drop another note and thank you to mention that I got it 
working.  I had been mimicking how the dracut-emergency.service worked, 
but the media-check service made an even better example by being even more 
trivial.  So, thanks again!


--
John Florian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/livecd/attachments/20130313/9667be4b/attachment.html>


More information about the livecd mailing list