diff options
author | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2006-07-28 09:56:54 +0000 |
---|---|---|
committer | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2006-07-28 09:56:54 +0000 |
commit | ae62e99ac38dc6ad43329fd186a70be182a6030d (patch) | |
tree | b40867ff21dffb4224e1ae980db745c51c12ae81 /security/openvpn/files | |
parent | Update to 0.03007 (diff) |
1 - build and install lib/openvpn-down-root.so plugin (see --plugin option in
the man page) and README.openvpn-down-root
2 - match rc.d filename as printed post install in pkg-message to actual file
name on newer systems (which use openvpn rather than openvpn.sh)
Reported by: Jean-Baptiste Quenot (Bcc'd)
The maintainer wishes to thank Jean-Baptiste for his report and patience.
3 - add a pkg-req script to prevent installation of 6.1 packages on older
machines, which is a frequent source of "rc.d script doesn't work"
complaints.
Added file(s):
- files/pkg-req.in
PR: ports/100917
Submitted by: Matthias Andree (maintainer)
Diffstat (limited to 'security/openvpn/files')
-rw-r--r-- | security/openvpn/files/pkg-message.in | 2 | ||||
-rw-r--r-- | security/openvpn/files/pkg-req.in | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/security/openvpn/files/pkg-message.in b/security/openvpn/files/pkg-message.in index 7b6d0e6cbfa0..64494e4d6a85 100644 --- a/security/openvpn/files/pkg-message.in +++ b/security/openvpn/files/pkg-message.in @@ -1,7 +1,7 @@ ### ------------------------------------------------------------------------ ### The OpenVPN FreeBSD port, since v2.0.1, uses rcNG to start OpenVPN. ### Edit /etc/rc.conf to start OpenVPN automatically at system startup. -### See %%PREFIX%%/etc/rc.d/openvpn.sh for details. +### See %%PREFIX%%/etc/rc.d/openvpn%%RCSFX%% for details. ### ------------------------------------------------------------------------ ### To get OpenVPN 1.X to talk with the new 2.0 version, you may need to ### edit the 1.X configuration file by adding these lines: diff --git a/security/openvpn/files/pkg-req.in b/security/openvpn/files/pkg-req.in new file mode 100644 index 000000000000..15c8242d8724 --- /dev/null +++ b/security/openvpn/files/pkg-req.in @@ -0,0 +1,29 @@ +set -e + +rcvers() { + # determine if we have "old" or "new" (rcorder integration) scheme + # for %%PREFIX%%/etc/rc.d/* files + if test $1 -ge 700007 || test $1 -lt 700000 -a $1 -ge 600101 ; then + echo 2 + else + echo 1 + fi +} + +if [ "$2" = INSTALL ] ; then + # check if the base system is new enough for us, + # which should only matter for package installs. + buildrc=$(rcvers %%OSVERSION%%) + execrc=$(rcvers $(sysctl -n kern.osreldate) ) + if test $buildrc -gt $execrc ; then + cat <<EOF + +Error: this package, $1, was compiled for a newer FreeBSD +====== version that uses different boot scripts. + Therefore, the rc.d script WILL NOT WORK. + Please update your ports tree and install security/openvpn from there. + +EOF + exit 1 + fi +fi |