read bash?

Jan Eidtmann cmak at lunar-linux.org
Tue Jan 30 10:06:57 CET 2007


On Mon, Jan 29, 2007 at 16:00:03 -0800
Auke Kok <sofar at foo-projects.org> wrote:
> Jan Eidtmann wrote:
> > hello,
> > 
> > im having a problem...
> > the cmd
> >     run_with_msg "Opening device /dev/sdb1:\n" 
> > "/sbin/cryptsetup luksOpen /dev/sdb1 sdb1_c"
> > 
> > works fine alone (in /etc/init.d/mount), it prompts for a 
> > password as it should.  enculapsed in this while-loop it 
> > stops working
> > 
> > sed 's/#.*$//g' /etc/crypttab | tr '\t' ' ' | grep -v -e 
> > '^$' | while read DEVICE MAPPING
> > do stuff and stuff and
> > run_with_msg "Opening device $DEVICE:\n" "/sbin/cryptsetup 
> > luksOpen $DEVICE $MAPPING"
> > done
> > 
> > that is, i guess, because "read" is used before and 
> > cryptsetup cant get the input from the keyboard or 
> > something- so...either i dont use read in the while-loop or 
> > i "reset" the read thing "somehow". but how? :>
> 
> you can't prompt for a password during the init process. period. not allowed. 
> doesn't work. won't ever work.
> 
> Auke

what do you mean i cant, it works for me. it just doesnt 
work from inside the "while read..." loop
what do you mean not allowed?



 ///
cmak


More information about the Lunar-dev mailing list