On Fri, Feb 16, 2001 at 12:08:46PM +0530, sreangsu acharyya wrote:
>On Fri, 16 Feb 2001, Rajesh Fowkar wrote:
>
>> Yes Mukund. I will do that but my main problem now is termination of mgetty
>> so that I can dial-out. Starting mgetty again is after that. How can I
>> terminate mgetty so that modem becomes free for dialing out.
>
>Hi Rajesh,
> replace the 'respawn' option in your inittab with 'once' for mgetty.
>This will start mgetty for the 1st time the run level is entered, but will
>not re-spawn it everytime it is killed.
Thanks sreangsu. This 'once' option seems to be better. I will use that.
But still my question remains. How to kill mgetty from the script.
The script will be something like this.
1. terminate mgetty
2. dial-out ( wvdial )
3. sendmail -q ( in /etc/ppp/ip-up.local )
4. fetchmail ( in /etc/ppp/ip-up.local )
5. ppp will die after time out
6. restart mgetty
ps. : instead of respawing should I start mgetty from startup scripts ?
say in /etc/rc.d/rc.local
/sbin/mgetty -s 115200 ttyS1
but again how to kill it / terminate it through a script ?
>There is also an option for
>binding a process to some key sequence "kbr--something" dont remeber it
>exactly.
> This option would be even better, so that whenever the key sequence is
>intercepted it would start mgetty ( something like <ctrl><alt><del> )
I want to terminate and than restart mgetty through a script. So this
kbrequest(key board request) is not useful for me.
<snip from inittab man page>
kbrequest
The process will be executed when init receives a signal from the
keyboard handler that a special key combination was pressed on the
console keyboard.
The documentation for this function is not complete yet; more
documentation can be found in the kbd-x.xx packages (most recent was
kbd-0.94 at the time of this writing). Basically you want to map some
keyboard combination to the "KeyboardSignal" action.
For example, to map Alt-Uparrow for this purpose use the following in
your keymaps file:
alt keycode 103 = KeyboardSignal
<snip from inittab man page>
Regards
--
Rajesh Fowkar
(Computer Programmer)
V. S. DEMPO & CO. LTD., PANAJI-GOA
Email ID : [EMAIL PROTECTED], [EMAIL PROTECTED]
Web Site : http://www.dempos.com
----------------------------------------------
Find out more about this and other Linux India
mailing lists at http://lists.linux-india.org/