Re: [newbie] How to write a bash login script?
Thanks to everyone for the help. I'm just starting to learn scripting. I'm also going to get the O'Reilly book on Expect. Someone else suggested that as a good place to start. Nico, you may want to look at the IBM support site for the driver for your modem. I just did a quick search and apparently there is a driver listed for the 570E. When I downloaded the driver I'm using, it only listed the 600E, not the 600 as being supported, but it worked anyway. Thanks, Michael On Fri, 08 Jun 2001, Nico Krzebek wrote: > Lucky you! I didn't get the softmodem on my TP570 (lucent modem) into a > working state. > > Since your script needs to be run just once after system boot, you could > for instance append the line > > /path_to_script/acpsetup > > to /etc/rc.d/rc.local, so it gets automatically executed when your box > switches to runlevel 2, 3 or 5. If you want it to be run only in certain > runlevels (e.g. 5) make a link named S99z_acpsetup in /etc/rc5.d/, i.e. you > type > > ln -s /path_to_script/acpsetup /etc/rc5.d/S99z_acpsetup > > This way you don't have to su or anything like that. > > Good luck, > Nico > > On Thursday 07 June 2001 15:49, you wrote: > > I have an IBM 600 laptop running 7.2 and it has an internal ACP (Win > > Modem). I downloaded a driver from the IBM website and installed it fine > > and the modem works well. It's just that after start-up and rebooting, I > > have to su in and give root password and issue the following commands. > > > > #!/bin/bash > > cd /usr/mwave/mw* > > insmod mwavedd > > setserial ttyS1 autoconfig > > ./mwavem > > > > I wrote a script to do this portion called acpsetup. How do I write the > > script to have it login as su and supply the password and issue the > > commands. I'd like to get it down to one simple ./acpsetup command to > > handle everything. > > > > Thanks, > > > > Michael
Re: [newbie] How to write a bash login script?
Lucky you! I didn't get the softmodem on my TP570 (lucent modem) into a working state. Since your script needs to be run just once after system boot, you could for instance append the line /path_to_script/acpsetup to /etc/rc.d/rc.local, so it gets automatically executed when your box switches to runlevel 2, 3 or 5. If you want it to be run only in certain runlevels (e.g. 5) make a link named S99z_acpsetup in /etc/rc5.d/, i.e. you type ln -s /path_to_script/acpsetup /etc/rc5.d/S99z_acpsetup This way you don't have to su or anything like that. Good luck, Nico On Thursday 07 June 2001 15:49, you wrote: > I have an IBM 600 laptop running 7.2 and it has an internal ACP (Win > Modem). I downloaded a driver from the IBM website and installed it fine > and the modem works well. It's just that after start-up and rebooting, I > have to su in and give root password and issue the following commands. > > #!/bin/bash > cd /usr/mwave/mw* > insmod mwavedd > setserial ttyS1 autoconfig > ./mwavem > > I wrote a script to do this portion called acpsetup. How do I write the > script to have it login as su and supply the password and issue the > commands. I'd like to get it down to one simple ./acpsetup command to > handle everything. > > Thanks, > > Michael
[newbie] How to write a bash login script?
I have an IBM 600 laptop running 7.2 and it has an internal ACP (Win Modem). I downloaded a driver from the IBM website and installed it fine and the modem works well. It's just that after start-up and rebooting, I have to su in and give root password and issue the following commands. #!/bin/bash cd /usr/mwave/mw* insmod mwavedd setserial ttyS1 autoconfig ./mwavem I wrote a script to do this portion called acpsetup. How do I write the script to have it login as su and supply the password and issue the commands. I'd like to get it down to one simple ./acpsetup command to handle everything. Thanks, Michael