Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: gerald_clark on March 08, 2012, 01:13:50 PM

Title: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: gerald_clark on March 08, 2012, 01:13:50 PM
Bash is required to run key gen scripts, but this is not mentioned in the info file or deps file.
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: maro on March 08, 2012, 04:56:05 PM
Whilst it is true that most (but not all) of the (wrapper) scripts in '/usr/local/share/openvpn/easy-rsa/2.0' have a shebang of '#!/bin/bash' I noticed that all of the (similar) scripts in '/usr/local/share/openvpn/easy-rsa/1.0' use just '#!/bin/sh'. I furthermore did a syntax test (e.g. via 'sh -n ...') and a quick "visual" inspection and could not identify any "bash-isms" that would require the 'bash.tcz' extension. So, I'd rather like to suggest to change the shebang line of the "offenders" to use #!/bin/sh' instead.

OTOH it might be prudent to put some note into the info file of how to use these scripts. I for one (without reading any openvpn documentation) could not make much sense out of them (apart from realising that one either has to set the 'EASY_RSA' environment variable to the appropriate directory or would have to 'cd' into it).
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: gerald_clark on March 08, 2012, 06:19:03 PM
I'm in favor of changing the scripts.
I did:
echo "/bin/sh $*" > /bin/bash ; chmod +x /bin/bash

Everything ran ok.

Openssl is also needed.
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: gutmensch on March 09, 2012, 04:22:29 AM
will change scripts and update to 2.2.2 ;-)
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: curaga on March 09, 2012, 04:30:37 AM
Please ping upstream too.
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: gutmensch on March 09, 2012, 04:37:09 AM
Would have done, but obviously they already found out that was a little over the top... 2.2.2 doesn't contain bash in any script (neither in easy-rsa 1.0 nor in 2.0) anymore ;)
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: gutmensch on March 09, 2012, 05:32:51 AM
Updated and uploaded, please check. As for a easy-rsa I'll leave it up and pointed to a better documentation at openvpn.net.

I don't feel like I can generally cover all the related VPN topics in a small info file... one signs with CA, another one self-signs, special tunnel security, compression and so on.
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: Uncle Warthog on March 15, 2012, 08:33:02 PM
Does this version of the tcz include any of the plugins?  I'm most interested in the down-root plugin but the auth-pam plugin can come in handy too.
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: gerald_clark on March 15, 2012, 09:00:38 PM
Look in the files tab, and see what is included.
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: gutmensch on March 16, 2012, 05:01:36 AM
I didn't even know of OpenVPN plugins before this post :) but since there are only 3 "official" community plugins, I'll have a look to include them.
Title: Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
Post by: Uncle Warthog on April 17, 2012, 11:58:18 AM
I didn't even know of OpenVPN plugins before this post :) but since there are only 3 "official" community plugins, I'll have a look to include them.

Thanks.  I've found the down-root plugin to be very handy for clients as it lets you run the openvpn client with reduced rights (still needs to be started as user or root but switches to nobody while running) and still run a shutdown script later.