Script for scheduling Dataone connection in Opensuse


Recommended Posts

Hi,

I'm using OpenSuse 11.0.

I've a Dataone broadband connection in bridged mode. I use Kinternet to manually connect to internet. I've a limited bandwith net connection which provides unlimited downloads between 2.00-8.00AM.

I've tried to keep running my net connection and scheduling downloads in Ktorrent. But when kept idle, the connecion disconnects after sometime. I've entered Idle Time Out as 0 in DSL settings.

Executing sudo -i and /sbin/ifup dsl0 from terminal starts the net.

I've tried making a script as follows and running it using Kcron

#!/bin/bash

sudo -i

/sbin/ifup dsl0

exit 0

I've removed password for sudo by using Yast also made the file executible from the properties.

But this doesn't work.

Now pls tell me why?

______________

Arup

Link to comment
Share on other sites

I am pretty sure you would need to do it like this:

#!/bin/bash
gksudo /sbin/ifup dsl0

is that what you were looking for?

Link to comment
Share on other sites

I picked it because I have not really done much scripting, and I know how to make gksudo work. :unsure:

Link to comment
Share on other sites

#!/bin/bash

sudo -i

/sbin/ifup dsl0

exit 0

But above when saved as a file (dsl.sh) and made executible does not starts net when run from terminal.

whyyy??

___________

Arup

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.