Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 108945 - openvpn init script broken
Summary: openvpn init script broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
: 110623 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-11 16:28 UTC by Patrick Fourniols
Modified: 2005-10-27 07:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
openvpn init for all baselayouts (openvpn,1.76 KB, text/plain)
2005-10-13 03:07 UTC, Roy Marples (RETIRED)
Details
openvpn symlink init script (openvpn,1001 bytes, text/plain)
2005-10-13 03:42 UTC, Roy Marples (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Fourniols 2005-10-11 16:28:16 UTC
openvpn don't start after upgrading to baselayout-1.12.0_pre9 with the init
script: unable to find the local.conf file.
just changing "--cd ${VPN}" and "--config ${VPN}/local.conf"
by "--cd ${VPNDIR}/${VPN}" and "--config local.conf"
and the script work again ;)
don't know what is best for handling dir in this script ;)

Reproducible: Always
Steps to Reproduce:
1. see above ;)
2.
3.

just for info on the two other computer that run openvpn same thing ( an
athlon-xp and a pentium 3 ;) )
Actual Results:  
see above ;)

Expected Results:  
see above ;)

Portage 2.0.53_rc5 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2,
2.6.13-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.13-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre9
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/home/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="fr_FR@euro"
LINGUAS="fr"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X X509 Xaw3d acpi alsa apache2 apm audiofile avi bash-completion
berkdb bitmap-fonts bluetooth bonobo cdr chroot clamav clamd crypt cups curl
dbus directfb dv dvd dvdr dvdread eds emboss emul-linux-x86 encode esd evo fam
fbcon font-server foomaticdb fortran ftp gdbm gecko-sdk gif gimp gimpprint gnome
gnome-print gnomedb gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal ieee1394
imagemagick imlib imlib2 ipv6 jack jack-tmpfs java jikes joystick jpeg kde ldap
lm_sensors lzw lzw-tiff mad maildir mbrola motif mozilla mp3 mpeg mysql nas
ncurses nfs nls nvidia odbc ogg opengl pam pdflib perl png ppds python qt
quicktime readline rhythmbox ruby samba scanner sdl sndfile spell ssl svg tcltk
tcpd tiff truetype truetype-fonts type1 type1-fonts usb userlocales v4l v4l2 vcd
vorbis xine xml xml2 xmms xpm xv zlib linguas_fr userland_GNU kernel_linux
elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, MAKEOPTS
Comment 1 Roy Marples (RETIRED) gentoo-dev 2005-10-11 17:18:18 UTC
What version of baselayout did you upgrade from?
Comment 2 Patrick Fourniols 2005-10-11 22:12:55 UTC
i think baselayout-1.12.0_pre8 but can't be very sure ;) in fact the last ~x86
and ~amd64 stable version...
Comment 3 Roy Marples (RETIRED) gentoo-dev 2005-10-11 23:33:11 UTC
Personally I think the openvpn init script is broken - very much so. Variables
really need to be quoted (hint - it breaks if there's a folder with a space in
the name) and the dev must have an editor >80 characters wide.

If the reporter could attach a fully working sample for
/etc/openvpn/a_working_config (or email to uberlord@gentoo.org if you don't want
others to read it) then I'll fix the script and attach to this bug.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2005-10-13 03:07:47 UTC
Created attachment 70540 [details]
openvpn init for all baselayouts

Please test and report back.

The only thing I dislike about this init script is that you either start or
stop all the vpns - you may only want to start/stop one of them.

This is solvable by creating symlinks like so
cd /etc/init.d
ln -s openvpn openvpn.vpn1
ln -s openvpn openvpn.vpn2

Then each vpn can be started and stopped by itself and use /etc/openvpn
(default) or /etc/openvpn/vpn1

Thoughts?
Comment 5 Roy Marples (RETIRED) gentoo-dev 2005-10-13 03:10:16 UTC
Uh - just to clarify, the symlink trick to control seperate vpns requires a new
init script - but it's trivial to write one if anyone's interested
Comment 6 Roy Marples (RETIRED) gentoo-dev 2005-10-13 03:42:11 UTC
Created attachment 70547 [details]
openvpn symlink init script

This init script works by symlink name as described above

openvpn -> /etc/openvpn
openvpn.vpn1 -> /etc/openvpn/vpn1

Again it has the advantage of being able to start stop different vpns :)
Comment 7 Patrick Fourniols 2005-10-13 06:51:45 UTC
all scripts works fine, prefered one the last ;)
good work
ps: will see when have time how to mix the two ways, perhaps 
with the pid files ...
Comment 8 Roy Marples (RETIRED) gentoo-dev 2005-10-13 07:17:19 UTC
Fixed in 2.0.2-r1

It has a new init script, based on the symlink one here except we no longer use
the /openvpn/vpn1/local.conf as we use /etc/openvpn/vpn1.conf instead. See the
post install instructions on how to configure.
Comment 9 SpanKY gentoo-dev 2005-10-27 07:53:09 UTC
*** Bug 110623 has been marked as a duplicate of this bug. ***