* Start openvpn with my own config at startup
@ 2015-05-27 18:07 Matthew Karas
2015-05-27 18:55 ` Alex J Lennon
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matthew Karas @ 2015-05-27 18:07 UTC (permalink / raw)
To: yocto@yoctoproject.org
I have an ovpn file I'd like my system to start up with. I was able
to install the openvpn file into /etc/openvpn using a bbappends file -
but the system doesn't start openvpn like the openvpn docs describes.
How do I set up openvpn to launch with my config file at start up?
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Start openvpn with my own config at startup
2015-05-27 18:07 Start openvpn with my own config at startup Matthew Karas
@ 2015-05-27 18:55 ` Alex J Lennon
2015-05-27 19:03 ` Christian Ege
2015-05-28 11:23 ` Chris Morgan
2 siblings, 0 replies; 4+ messages in thread
From: Alex J Lennon @ 2015-05-27 18:55 UTC (permalink / raw)
To: Matthew Karas; +Cc: yocto@yoctoproject.org
Hi Matthew,
On 27/05/2015 20:07, Matthew Karas wrote:
> I have an ovpn file I'd like my system to start up with. I was able
> to install the openvpn file into /etc/openvpn using a bbappends file -
> but the system doesn't start openvpn like the openvpn docs describes.
>
> How do I set up openvpn to launch with my config file at start up?
>
> Thanks
We're using OpenVPN here too. I put a .bbappend together along these
lines which does the job for me. I think you may be needing the
update-rc.d incantations which are documented here
http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-classes-update-rc.d
e.g.
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
SRC_URI += "file://openvpn.conf \
"
do_install_append() {
install -d ${D}${sysconfdir}/openvpn
install -m 644 ${WORKDIR}/openvpn.conf
${D}${sysconfdir}/openvpn/openvpn.conf
}
inherit update-rc.d
INITSCRIPT_NAME = "${PN}"
INITSCRIPT_PACKAGES = "${PN}"
INITSCRIPT_PARAMS = "start 90 5 2 . stop 30 0 1 6 ."
...
fwiw we've found that across multiple channels (wired, wireless 802.11,
cellular) we need something more than this and so have started looking
at connman + ofono to provide connection management. NB connman supports
OpenVPN.
Hope that helps,
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Start openvpn with my own config at startup
2015-05-27 18:07 Start openvpn with my own config at startup Matthew Karas
2015-05-27 18:55 ` Alex J Lennon
@ 2015-05-27 19:03 ` Christian Ege
2015-05-28 11:23 ` Chris Morgan
2 siblings, 0 replies; 4+ messages in thread
From: Christian Ege @ 2015-05-27 19:03 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 963 bytes --]
> Am 27.05.2015 um 20:07 schrieb Matthew Karas <mkarascybi@gmail.com>:
>
> I have an ovpn file I'd like my system to start up with. I was able
> to install the openvpn file into /etc/openvpn using a bbappends file -
> but the system doesn't start openvpn like the openvpn docs describes.
>
> How do I set up openvpn to launch with my config file at start up?
It depends if you build for a systemd or init.d based set-up. If you are building for init.d which is the default setting you can check the init script how openvpn is started:
http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/openvpn/openvpn/openvpn <http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/openvpn/openvpn/openvpn>
Regards,
Christian
>
> Thanks
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
[-- Attachment #2: Type: text/html, Size: 1717 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Start openvpn with my own config at startup
2015-05-27 18:07 Start openvpn with my own config at startup Matthew Karas
2015-05-27 18:55 ` Alex J Lennon
2015-05-27 19:03 ` Christian Ege
@ 2015-05-28 11:23 ` Chris Morgan
2 siblings, 0 replies; 4+ messages in thread
From: Chris Morgan @ 2015-05-28 11:23 UTC (permalink / raw)
To: Matthew Karas; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 854 bytes --]
On Wednesday, May 27, 2015, Matthew Karas <mkarascybi@gmail.com> wrote:
> I have an ovpn file I'd like my system to start up with. I was able
> to install the openvpn file into /etc/openvpn using a bbappends file -
> but the system doesn't start openvpn like the openvpn docs describes.
>
> How do I set up openvpn to launch with my config file at start up?
>
>
Openvpn doesn't come with init or systemd support out of the box?
If you are using systemd there is a class that will take care of installing
and enabling a service file for you. You'd have to write the service file
yourself I think. There should be some examples of how other recipes are
using it if you search for systemd in the base poky recipes.
You can put your changes into the .bbappend and they should take effect
when you build and install the recipe.
Chris
[-- Attachment #2: Type: text/html, Size: 1165 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-28 11:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 18:07 Start openvpn with my own config at startup Matthew Karas
2015-05-27 18:55 ` Alex J Lennon
2015-05-27 19:03 ` Christian Ege
2015-05-28 11:23 ` Chris Morgan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.