![]() |
Running script when network interface is up
Hi all,
i am trying to run this script when network interface is up on my N9: Code:
#!/bin/sh Code:
/etc/network/if-up.d/50_connect_home Upon connecting to my wlan, the file /root/data is still empty, which suggests the script does not run. Any pointers? Thanks, sargas. |
Re: Running script when network interface is up
Forgive me if I'm wrong, for I don't have a N9 myself, but doesn't Aegis prevent modification of files owned by root, even by root itself?
Try to append the data to a file in your home folder. |
Re: Running script when network interface is up
Quote:
Quote:
I think there is something more to be done than just putting the script in /etc/network/if-up.d/ but i can't figure it out. |
Re: Running script when network interface is up
Quick reply...
Look up file "/etc/network/interfaces". Besides lines "address ...", "netmask ....", "gateway ...", there can also be lines "up ...." and "down ..." - to run scripts when a connection starts and stops. Best wishes. |
Re: Running script when network interface is up
So, what does your check for ifup look like? The condition itself, if you like, not what you do if and when the condition is met.
|
Re: Running script when network interface is up
Quick reply...
Contents of file "/etc/network/interaces": Code:
auto usb0 Best wishes. |
Re: Running script when network interface is up
try to set a execute bit
Code:
sudo chmod +x path_to_script or jsut set up a PATH variable Code:
#!/bin/sh |
Re: Running script when network interface is up
Quote:
|
Re: Running script when network interface is up
Quote:
Code:
Also tried just one line at end of file: Code:
up /etc/network/if-up.d/50_connect_home Edit: fixed code tags. |
Re: Running script when network interface is up
Quote:
|
All times are GMT. The time now is 00:20. |
vBulletin® Version 3.8.8