- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Disable modem when not in use
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 01:12 AM
11-16-2001 01:12 AM
Disable modem when not in use
Our server has a modem installed for dial-in support purpose. Is there any cmd to disable it (like disable a printer/queue)? I can call my staff to login any terminal to enable it when I need to dial in.
I can't turn it off as it is placed in a locked room.
Any suggestion is appreciated.
Thanks
Edmund
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 01:18 AM
11-16-2001 01:18 AM
Re: Disable modem when not in use
An option is the delete and recreate the device file as and when needed.
Write a small script to do it.
Just an idea.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 01:38 AM
11-16-2001 01:38 AM
Re: Disable modem when not in use
Disable dialin :
edit /etc/inittab, remark the respawn of the getty for the modem. After that run an init q and kill the getty process. To avoid dialing out restrict the rights for the cu utility.
Rgds
Alexander M. Ermes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 06:03 AM
11-16-2001 06:03 AM
Re: Disable modem when not in use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 06:11 AM
11-16-2001 06:11 AM
Re: Disable modem when not in use
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 06:57 AM
11-16-2001 06:57 AM
Re: Disable modem when not in use
How is your dial-in modem used. If there is a getty running on the port to which the modem is connected you can diable it by setting the entry "respawn" to "off" in the /etc/inittab file for that port and then doing a "init q". Chanege "off" to "respawn" if you want to enable the getty on the port and then do "init q".
If you can do all this, why don't you ask them to turn the modem off and just call in and ask them to turn it on. Will save a lot of headache.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 05:30 PM
11-16-2001 05:30 PM
Re: Disable modem when not in use
Thx for your reply.
Can I have a sample of the scripts you mentioned?
Is it like this?
# disable
touch .lock /usr/spool/uucp
# enable
rm /usr/spool/uucp/.lock
Edmund
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 05:53 PM
11-16-2001 05:53 PM
Re: Disable modem when not in use
Eg: dialin:4:reswpan /dev/modem
nodial:5:
whatever....
then it's a simple matter of changing run levels to be able to dial in or not dial in.
I used to do this years ago on a BSD box to make the modem either dial in or dial out.
init 5 was dial out
init 6 was dial in.
just my 2 cents worth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 06:55 PM
11-16-2001 06:55 PM
Re: Disable modem when not in use
In vi, I can use "g/ttyd2a2/s/respawn/off" to modify the line. How can I do this with sed?
"sed '
Thx.
Edmund
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 07:03 PM
11-16-2001 07:03 PM
Re: Disable modem when not in use
Use sed -e for regular expressions ie.
sed -e 's/
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 07:12 PM
11-16-2001 07:12 PM
Re: Disable modem when not in use
Thx. But there are many 'respawn' in inittab and I just want to replace the one in ttyd2a2 line. (ie find text1, replace text2 with text3)
Any suggestion
Edmund
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 07:32 PM
11-16-2001 07:32 PM
Re: Disable modem when not in use
Not so sure that there is any search function included in sed.
One way is to include the search pattern in the replacing and replacement string eg.:
$ sed 's/ttyd2a2:234:respawn/ttyd2a2:234:off/' inittab
One easy way is to include use of grep:
grep -v ttyd2a2 inittab > inittab.new;grep ttyd2a2 inittab|sed 's/respawn/off/g' >> inittab.new;mv inittab.new inittab
I think awk would be better tool in such cases.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com