From 9aac569eaa031e27191a3f4165b389a17f467ad2 Mon Sep 17 00:00:00 2001 From: Doug Barton Date: Sun, 5 Aug 2012 23:19:36 +0000 Subject: Move the rc.d scripts of the form *.sh.in to *.in Where necessary add $FreeBSD$ to the file No PORTREVISION bump necessary because this is a no-op --- ftp/vsftpd-ext/Makefile | 2 +- ftp/vsftpd-ext/files/vsftpd.in | 51 +++++++++++++++++++++++++++++++++++++++ ftp/vsftpd-ext/files/vsftpd.sh.in | 51 --------------------------------------- 3 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 ftp/vsftpd-ext/files/vsftpd.in delete mode 100644 ftp/vsftpd-ext/files/vsftpd.sh.in (limited to 'ftp/vsftpd-ext') diff --git a/ftp/vsftpd-ext/Makefile b/ftp/vsftpd-ext/Makefile index 57f423a79422..9aae1023b9a9 100644 --- a/ftp/vsftpd-ext/Makefile +++ b/ftp/vsftpd-ext/Makefile @@ -36,7 +36,7 @@ OPTIONS= RC_SCRIPT "install RC_SCRIPT" on \ .include .if defined(WITH_RC_SCRIPT) -USE_RC_SUBR= vsftpd.sh +USE_RC_SUBR= vsftpd .endif .if defined(WITH_VSFTPD_SSL) && !defined(WITHOUT_SSL) diff --git a/ftp/vsftpd-ext/files/vsftpd.in b/ftp/vsftpd-ext/files/vsftpd.in new file mode 100644 index 000000000000..1832f6fe9d16 --- /dev/null +++ b/ftp/vsftpd-ext/files/vsftpd.in @@ -0,0 +1,51 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: vsftpd +# REQUIRE: DAEMON + +# To enable 'vsftpd' in standalone mode, you need to edit two files. +# 1. add the following line(s) to /etc/rc.conf to enable `vsftpd': +# +# vsftpd_enable="YES" +# vsftpd_flags="/some/path/conf.file" # Not required +# +# 2. tell vsftpd about standalone mode +# Edit %%PREFIX%%/etc/vsftpd.conf (or /some/path/conf.file) to contain +# +# listen=YES +# background=YES +# +# Samples are provided at the end of the configuration file. + +. /etc/rc.subr + +name="vsftpd" +rcvar=vsftpd_enable + +load_rc_config "$name" +: ${vsftpd_enable:="NO"} + +command="%%PREFIX%%/libexec/$name" +required_files="%%PREFIX%%/etc/$name.conf" +start_precmd="vsftpd_check" + +vsftpd_check() +{ + if grep -q "^ftp[ ]" /etc/inetd.conf ${required_files} + then + err 1 "ftp is already activated in /etc/inetd.conf" + fi + if ! egrep -q -i -E "^listen.*=.*YES$" ${required_files} + then + err 1 'vsftpd script need "listen=YES" in config file' + fi + if ! egrep -q -i -E "^background.*=.*YES$" ${required_files} + then + err 1 'vsftpd script need "background=YES" in config file' + fi +} + +run_rc_command "$1" diff --git a/ftp/vsftpd-ext/files/vsftpd.sh.in b/ftp/vsftpd-ext/files/vsftpd.sh.in deleted file mode 100644 index 1832f6fe9d16..000000000000 --- a/ftp/vsftpd-ext/files/vsftpd.sh.in +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: vsftpd -# REQUIRE: DAEMON - -# To enable 'vsftpd' in standalone mode, you need to edit two files. -# 1. add the following line(s) to /etc/rc.conf to enable `vsftpd': -# -# vsftpd_enable="YES" -# vsftpd_flags="/some/path/conf.file" # Not required -# -# 2. tell vsftpd about standalone mode -# Edit %%PREFIX%%/etc/vsftpd.conf (or /some/path/conf.file) to contain -# -# listen=YES -# background=YES -# -# Samples are provided at the end of the configuration file. - -. /etc/rc.subr - -name="vsftpd" -rcvar=vsftpd_enable - -load_rc_config "$name" -: ${vsftpd_enable:="NO"} - -command="%%PREFIX%%/libexec/$name" -required_files="%%PREFIX%%/etc/$name.conf" -start_precmd="vsftpd_check" - -vsftpd_check() -{ - if grep -q "^ftp[ ]" /etc/inetd.conf ${required_files} - then - err 1 "ftp is already activated in /etc/inetd.conf" - fi - if ! egrep -q -i -E "^listen.*=.*YES$" ${required_files} - then - err 1 'vsftpd script need "listen=YES" in config file' - fi - if ! egrep -q -i -E "^background.*=.*YES$" ${required_files} - then - err 1 'vsftpd script need "background=YES" in config file' - fi -} - -run_rc_command "$1" -- cgit v1.2.3