WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.  (Read 3500 times)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Bash is required to run key gen scripts, but this is not mentioned in the info file or deps file.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #1 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).

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #2 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.

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #3 on: March 09, 2012, 04:22:29 AM »
will change scripts and update to 2.2.2 ;-)
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11041
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #4 on: March 09, 2012, 04:30:37 AM »
Please ping upstream too.
The only barriers that can stop you are the ones you create yourself.

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #5 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 ;)
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #6 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.
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline Uncle Warthog

  • Newbie
  • *
  • Posts: 8
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #7 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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #8 on: March 15, 2012, 09:00:38 PM »
Look in the files tab, and see what is included.

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #9 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.
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline Uncle Warthog

  • Newbie
  • *
  • Posts: 8
Re: openvpn.tcz ( core 4 ) requires bash to run key generating scripts.
« Reply #10 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.