meta-digi-del: rework vsftpd package
* clean compiler warning * add bootscript and config files (from DEL) * enable vsftpd in del-network packagegroup https://jira.digi.com/browse/DEL-150 #resolve Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
9452bef8b9
commit
41ee1a135d
|
|
@ -17,8 +17,7 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
|
|||
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
|
||||
|
||||
# Distro can override the following VIRTUAL-RUNTIME providers:
|
||||
VIRTUAL-RUNTIME_ftp-server ?= ""
|
||||
#VIRTUAL-RUNTIME_ftp-server ?= "vsftpd"
|
||||
VIRTUAL-RUNTIME_ftp-server ?= "vsftpd"
|
||||
|
||||
VIRTUAL-RUNTIME_http-server ?= ""
|
||||
#VIRTUAL-RUNTIME_http-server ?= "cherokee"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/sh
|
||||
#===============================================================================
|
||||
#
|
||||
# vsftpd
|
||||
#
|
||||
# Copyright (C) 2013 by Digi International Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 as published by
|
||||
# the Free Software Foundation.
|
||||
#
|
||||
#
|
||||
# !Description: vsftpd bootscript
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
set -e
|
||||
|
||||
daemon="/usr/sbin/vsftpd"
|
||||
pidfile="/var/run/vsftpd.pid"
|
||||
|
||||
[ -x "${daemon}" ] || exit 0
|
||||
|
||||
# Required directories
|
||||
[ -d /var/run ] || install -m 755 -o root -g root -d /var/run
|
||||
[ -d /var/lib/ftp ] || install -m 755 -o root -g ftp -d /var/lib/ftp
|
||||
[ -d /var/share/empty ] || install -m 755 -o root -g root -d /var/share/empty
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
[ -z "${quietboot}" ] && echo -n "Starting vsftpd server: "
|
||||
if [ -s "${pidfile}" ]; then
|
||||
pid="$(cat ${pidfile})"
|
||||
if kill -0 "${pid}" 2>/dev/null; then
|
||||
[ -z "${quietboot}" ] && echo " already running."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
start-stop-daemon -S -b -m -p "${pidfile}" -x "${daemon}"
|
||||
[ -z "${quietboot}" ] && echo "OK"
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping vsftpd server: "
|
||||
start-stop-daemon -K -q -p "${pidfile}"
|
||||
rm "${pidfile}"
|
||||
echo "OK"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#######################################
|
||||
## vsftpd.conf
|
||||
#######################################
|
||||
listen=YES
|
||||
write_enable=YES
|
||||
local_enable=YES
|
||||
|
||||
anonymous_enable=YES
|
||||
anon_mkdir_write_enable=YES
|
||||
anon_other_write_enable=YES
|
||||
anon_root=/
|
||||
anon_upload_enable=YES
|
||||
no_anon_password=YES
|
||||
|
||||
dirmessage_enable=YES
|
||||
xferlog_enable=YES
|
||||
connect_from_port_20=YES
|
||||
file_open_mode=0777
|
||||
local_umask=022
|
||||
anon_umask=022
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
PR_del = "r0+${DISTRO}.0"
|
||||
DEPENDS_append_del += "openssl"
|
||||
LDFLAGS_del = "-lcap"
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/files"
|
||||
|
||||
PR_append = "+${DISTRO}.r0"
|
||||
DEPENDS += "openssl"
|
||||
|
||||
# Inhibit warning about files already stripped
|
||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
|
|
|
|||
Loading…
Reference in New Issue