LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-23-2019, 09:40 AM   #1
jefsa
Member
 
Registered: Mar 2012
Posts: 83
Blog Entries: 1

Rep: Reputation: Disabled
Starting a script upon detecting a network connection using Slackware 14.1


Hello,

Installed is Slackware 14.1.

Using a laptop as a portable device I would like to know how to create a script to execute upon
a detection to a Desktop Terminal. At this time a manual script looks for the IP address to the
Desktop Terminal and executes upon detection an update routine on the laptop. I would like to automate
this process.

Thanks.

Regards,

Jeff
 
Old 04-23-2019, 12:03 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
put it in a startup and put that script into a loop to keep checking continuously, or at a set x amount of time, sleep x check sleep x ... etc.

maybe in rc.local fire it up in there, or depends on what desktop you're running as you do not give the particulars.

Last edited by BW-userx; 04-23-2019 at 12:05 PM.
 
Old 05-08-2019, 03:17 PM   #3
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
until loop?

Code:
until ping -c 1 $ADDRESS ; do
  sleep 5
done
Follow loop with your script.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Starting VNC upon boot-up using specific user ortizmj Linux - Newbie 4 10-29-2010 11:30 AM
[SOLVED] Starting File System .. Starting File System .. Starting File System .. Starting File rmknox Linux - Newbie 3 08-15-2010 11:30 PM
[SOLVED] Network eth0 activated upon boot in ifcfg-eth0; but no network connection after login TomRaaijmakers Linux - Networking 1 06-17-2010 08:29 AM
Bash script hangs upon starting another script in the background masea2 Linux - Software 4 11-13-2006 05:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration