<div dir="ltr"><div><div><div><div><div><div><div><div>Hi,<br><br></div>I need some help with shell scripting (/bin/sh) in ubuntu.<br><br></div>In a shell script I want to turn down an interface, say eth0 and then turn it up. <br>
</div>So something like<br><br></div>ifdown eth0<br></div>ifup eth0<br><br></div>But what I want in my shell script is to check and wait till eth0 is up and then start doing something next in my shell script.<br></div>So something like "if ( eth0 not is up ) { sleep 1 }. But how do I do this in shell scripting ?<br>
<br></div>And then also I want something similar for checking if syslog process is up or not. Because actually I am writing syslog through that interface to another computer. So I want to check if eth0 is up. If up, check if syslog process is up, if not start, if yes, write something to syslog.<br>
<br>regards,<br><br>pluto<br></div>