Skip to contentSkip to conversation

correction for init script for SuSE

Openvpn-devel Stefan Engel 2 participants 2 messages Dec 13, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

the init script for SuSE (source in suse/openvpn.init) contains a bug regarding the location of the openvpn binary when used in an RPM. If OpenVPN is built using rpm then the resulting binary is installed as /usr/sbin/openvpn. The init script contains the following lines

Quoted 2 lines

# Location of openvpn binary
openvpn="/usr/local/sbin/openvpn"

/usr/local/sbin/openvpn may be valid when installing from tar.gz, but not if using rpm.

Attached is a patch against openvpn.spec in 2.0rc3 which should fix this.

Regards,

Stefan

openvpn.spec renamed from openvpn.spec.orig +3 -1
@@ -117,7 +117,9 @@
 # Install init script
 %if "%{VENDOR}" == "SuSE"
 %__install -c -d -m 755 %{buildroot}/etc/init.d
-%__install -c -m 755 suse/%{name}.init %{buildroot}/etc/init.d/%{name}
+%__sed -e 's#openvpn=\"/usr/local/sbin/openvpn\"#openvpn=\"/usr/sbin/openvpn\"#' < suse/%{name}.init > %{_tmppath}/%{name}.init
+%__install -c -m 755 %{_tmppath}/%{name}.init %{buildroot}/etc/init.d/%{name}
+%__rm %{_tmppath}/%{name}.init 
 %else
 %__install -c -d -m 755 %{buildroot}/etc/rc.d/init.d
 %__install -c -m 755 sample-scripts/%{name}.init %{buildroot}/etc/rc.d/init.d/%{name}
#1 lore raw
Quoted 7 lines · Stefan Engel

Hi,

the init script for SuSE (source in suse/openvpn.init) contains a bug regarding the location of the openvpn binary when used in an RPM. If OpenVPN is built using rpm then the resulting binary is installed as /usr/sbin/openvpn. The init script contains the following lines

Quoted 8 lines
Quoted 2 lines

# Location of openvpn binary
openvpn="/usr/local/sbin/openvpn"

/usr/local/sbin/openvpn may be valid when installing from tar.gz, but not if using rpm.

Attached is a patch against openvpn.spec in 2.0rc3 which should fix this.

Thanks, I will merge for rc4.

James