Plankton has asked for the wisdom of the Perl Monks concerning the following question:
The problem is that expect doesn't seem to be sending the password to su. I know this really a Perl question but I was hoping some of you nice monks might be able to help me?#!/bin/sh for i in \ perl_mod1 \ perl_mod2 \ perl_mod3 do echo "do $i ?" read doit if [ $doit = 'y' ] then rm -rf $i tar -xvf ${i}.tar cd $i perl Makefile.PL echo "perl makefile.pl okay?" read key make echo "make okay?" read key make test echo "make test okay?" read key # su root -c "/usr/local/bin/make install" expect -c 'spawn su root -c "/usr/local/bin/make insta +ll" send -- "rootspasswd\r" ' echo "make install okay?" read key cd .. else echo "okay f it" fi done
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using expect to do make install when installing perl mods
by Thelonius (Priest) on Sep 11, 2003 at 19:48 UTC | |
|
Re: Using expect to do make install when installing perl mods
by iburrell (Chaplain) on Sep 11, 2003 at 20:59 UTC | |
|
Re: Using expect to do make install when installing perl mods
by adrianh (Chancellor) on Sep 13, 2003 at 21:52 UTC |