summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-01-21 18:08:16 +0000
committeryar <yar@FreeBSD.org>2006-01-21 18:08:16 +0000
commite9ad335f2d503951dc2c390c60f355bbfab939b8 (patch)
treed7246ca0ba1c3ae72939db384ac9b8c967f60df3 /etc
parent06de550b9ddd31b26a79653d2b5efd8b47d8283d (diff)
downloadFreeBSD-src-e9ad335f2d503951dc2c390c60f355bbfab939b8.zip
FreeBSD-src-e9ad335f2d503951dc2c390c60f355bbfab939b8.tar.gz
Add an rc.d script for stand-alone ftpd.
Document the script's controls on the rc.conf(5) manpage and touch its Dd. PR: conf/90893 MFC after: 5 days
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf3
-rwxr-xr-xetc/rc.d/Makefile2
-rw-r--r--etc/rc.d/ftpd24
3 files changed, 28 insertions, 1 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index a6e5eba..8407c33 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -227,6 +227,9 @@ pppoed_interface="fxp0" # The interface that pppoed runs on.
sshd_enable="NO" # Enable sshd
sshd_program="/usr/sbin/sshd" # path to sshd, if you want a different one.
sshd_flags="" # Additional flags for sshd.
+ftpd_enable="NO" # Enable stand-alone ftpd.
+ftpd_program="/usr/libexec/ftpd" # Path to ftpd, if you want a different one.
+ftpd_flags="" # Additional flags to stand-alone ftpd.
### Network daemon (NFS): All need rpcbind_enable="YES" ###
amd_enable="NO" # Run amd service with $amd_flags (or NO).
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index c8ab8fd..04b5c8f 100755
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -9,7 +9,7 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \
devd devfs dhclient \
dmesg dumpon \
early.sh encswap \
- fsck \
+ fsck ftpd \
gbde geli geli2 \
hcsecd \
hostname \
diff --git a/etc/rc.d/ftpd b/etc/rc.d/ftpd
new file mode 100644
index 0000000..4837815
--- /dev/null
+++ b/etc/rc.d/ftpd
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: ftpd
+# REQUIRE: LOGIN cleanvar
+
+. /etc/rc.subr
+
+name="ftpd"
+rcvar=`set_rcvar`
+command="/usr/libexec/${name}"
+pidfile="/var/run/${name}.pid"
+start_precmd=ftpd_prestart
+
+ftpd_prestart()
+{
+ rc_flags="-D ${rc_flags}"
+ return 0
+}
+
+load_rc_config $name
+run_rc_command "$1"
OpenPOWER on IntegriCloud