[LINUX]. [LIVE] - Calling a .sh script...
#1
Question 
Good day everybody.
I am writing an advanced Network Script (in unix/.sh), which will allow you to:
1. Choose your interface (and enable it if it is disabled)
2. Enter your details (DHCP/STATIC) for the interface.
3. Choose the wireless AP froma list
4. Enter your pass and generate a key.

My QUESTIONs:
1. Is it possable to call the script from the XBMC interface? If so, how?
2. How do you configure XBMC that you DON'T have to hit the / to get to a popup-window?

Thanks to all the developers
Cheers
cyber7 (South Africa)
Reply
#2
It's possible to execute a script via System.Exec() builtin, but this would just start it, so you'd get zero confirmation or terminal to view it in.

So a python script that acts as a terminal would first be a requirenment.

FYI I'm working on network abstraction in #7248.

How is your script supposed to configure the network, is it against networkmanager, conman or just against the interface files? there exists a tool called cnetworkmanager which configures the network on a network-manager based distro.

Cheers,
Tobias
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#3
Hi Tobias
Thanks for the reply.

What I have done so-far (The script gets kicked-off currently from the command-line):
1. Check for all network interfaces and give the user a pop-up to choose the interface he would like to use.
2. a. If the interface is a ETH-type interface, SET and give an option to use DHCP or static. (DHCP=default)
2. b. If STATIC, give a box to fill in the details.
3. a. If WIRELESS, SET and give option to use DHCP or static. (DHCP=default)
3. b. Search for all AP's and give a list to choose which one to use. (I have about 20 AP's around me)
3. c. Once chosen, ask for the pass-KEY and generate the correct file.
4. Restart the network, and
WALA! Everthing works!

Problems I am currently experiencing:
1. the "\"-key needs to be pressed to configure the network (Informational message with timeout gets displayed)
2. the script needs to be kicked off from the command-line. Thus, the user needs to switch between the XBMC interface and the CONSOLE to manipulate.
3. I will still create a custom login if I can not get to the script via the XBMC interface.

Cheers and thanx for your quick reply
cyber7 (aka Aubrey)
Reply
#4
cyber7 Wrote:Hi Tobias
Thanks for the reply.

What I have done so-far (The script gets kicked-off currently from the command-line):
1. Check for all network interfaces and give the user a pop-up to choose the interface he would like to use.
2. a. If the interface is a ETH-type interface, SET and give an option to use DHCP or static. (DHCP=default)
2. b. If STATIC, give a box to fill in the details.
3. a. If WIRELESS, SET and give option to use DHCP or static. (DHCP=default)
3. b. Search for all AP's and give a list to choose which one to use. (I have about 20 AP's around me)
3. c. Once chosen, ask for the pass-KEY and generate the correct file.
4. Restart the network, and
WALA! Everthing works!

Problems I am currently experiencing:
1. the "\"-key needs to be pressed to configure the network (Informational message with timeout gets displayed)
2. the script needs to be kicked off from the command-line. Thus, the user needs to switch between the XBMC interface and the CONSOLE to manipulate.
3. I will still create a custom login if I can not get to the script via the XBMC interface.

Cheers and thanx for your quick reply
cyber7 (aka Aubrey)

I'd suggest you to take a look at my aptitude script, it executes a script (in this case python but it could just as easily be a batch one) and then the returned output is parsed and made into a GUI for XBMC, this might be a valid way to solve it for you.

However I just wanted to inform you that my plan is to have this functionality in core by camelot+1 (if all goes well ofcourse). Still if you make the script it would be most lovely to post it here or on trac so people can use it, and even I could for sure have a use for it in the abstraction aswell.

Cheers,
Tobias.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#5
Hi Tobias. (and others following this thread!)
I am still doing some refining on the UNIX .SH script. Once completed, I will post it with all the comments and more. It is starting to be one very fine piece of code, but some additional packages need to be loaded, which I would like to incorporate into the release.

Please could you give me some pointers to your aptitude script?

Cheers and have a grat day
cyber7 (aka Aubrey)
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX]. [LIVE] - Calling a .sh script...0