www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

New function in script vpnconfig

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
ny.bash



Joined: 11 Oct 2012
Posts: 3

PostPosted: Thu Oct 11, 2012 2:34 pm    Post subject: New function in script vpnconfig Reply with quote

Hi!

I'm trying to add new functionality to the page add openvpn client. At the moment I want to add the ability to change the type of device (tun/tap).

I added the necessary objects in the source code "templates/vpnconfig".

Code:

--------cut----------
  if ("<xvar TUN>"!="") {
    X.Dev.value="TUN";
  } else {
    X.Dev.value="TAP";
  }
---------cut-----------


And

Code:

---------cut-----------
Dev&nbsp;&nbsp;<select name=Dev><option value=TUN>TUN</option><option value=TAP>TAP</option></select>
---------cut-----------




But the script "templates/vpnconfig" do not transfer new parameters was script "script/createvpn"

I created a test script "script/createvpn" with the contents:
Code:

#!/bin/sh
for i in "${@}"; do echo "$i"; done > /root/test.txt


And on the way out, I get the following:
Quote:

root@zeroshell scripts> cat /root/test.txt
VPN02
Virtual Private Network
test
1197
UDP
Server


yes

X509

Auto


But why, among the variables is missing the TUN or TAP?

Help please!


Last edited by ny.bash on Sat Oct 13, 2012 5:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
ny.bash



Joined: 11 Oct 2012
Posts: 3

PostPosted: Fri Oct 12, 2012 8:54 am    Post subject: Reply with quote

OK, I understand that the output vpnconfig processed binary file /usr/local/apache2/cgi-bin/kerbynet

Where to find sources kerbynet?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group