summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]packages/netatalk/files/init68
-rw-r--r--packages/netatalk/files/netatalk.conf44
-rw-r--r--packages/netatalk/netatalk_2.0.3.bb52
3 files changed, 104 insertions, 60 deletions
diff --git a/packages/netatalk/files/init b/packages/netatalk/files/init
index 926f9bbb1e..380cc49e16 100755..100644
--- a/packages/netatalk/files/init
+++ b/packages/netatalk/files/init
@@ -1,62 +1,45 @@
-#!/sbin/runscript
-
-# AppleTalk daemons. Make sure not to start atalkd in the background:
-# its data structures must have time to stablize before running the
-# other processes.
-
-depend() {
- need net
- use logger dns
-}
+#!/bin/sh
atalk_startup () {
-# . /etc/netatalk/netatalk.conf
-
if [ "${ATALKD_RUN}" != "no" ]; then
- ebegin "Starting atalkd"
+ echo "Starting atalkd"
start-stop-daemon --start --quiet --exec /usr/sbin/atalkd
- eend $?
for reg in \
"${ATALK_NAME}:Workstation${ATALK_ZONE}" \
"${ATALK_NAME}:netatalk${ATALK_ZONE}"
do
- ebegin " Registering $reg"
+ echo " Registering $reg"
/usr/bin/nbprgstr "$reg"
- eend $?
done
if [ "${PAPD_RUN}" = "yes" ]; then
- ebegin " Starting papd"
+ echo " Starting papd"
start-stop-daemon --start --quiet --exec /usr/sbin/papd
- eend $?
fi
fi
if [ "${CNID_METAD_RUN}" = "yes" ] ; then
- ebegin "Starting cnid_metad"
+ echo "Starting cnid_metad"
start-stop-daemon --start --quiet --exec /usr/sbin/cnid_metad
- eend $?
fi
if [ "${AFPD_RUN}" = "yes" ]; then
- ebegin "Starting afpd"
+ echo "Starting afpd"
start-stop-daemon --start --quiet --exec /usr/sbin/afpd -- \
${AFPD_UAMLIST} -g ${AFPD_GUEST} -c ${AFPD_MAX_CLIENTS} \
-n "${ATALK_NAME}${ATALK_ZONE}"
- eend $?
fi
if [ "${TIMELORD_RUN}" = "yes" ]; then
- ebegin "Starting timelord"
+ echo "Starting timelord"
start-stop-daemon --start --quiet --exec /usr/sbin/timelord
- eend $?
fi
}
-start () {
+start_netatalk () {
. /etc/netatalk/netatalk.conf
if [ x"${ATALK_BGROUND}" = x"yes" ]; then
@@ -67,45 +50,54 @@ start () {
fi
}
-stop () {
+stop_netatalk () {
. /etc/netatalk/netatalk.conf
if [ "${AFPD_RUN}" = "yes" ]; then
- ebegin "Stopping afpd"
+ echo "Stopping afpd"
start-stop-daemon --stop --quiet --exec /usr/sbin/afpd
- eend $?
fi
if [ "${TIMELORD_RUN}" = "yes" ]; then
- ebegin "Stopping timelord"
+ echo "Stopping timelord"
start-stop-daemon --stop --quiet --exec /usr/sbin/timelord
- eend $?
fi
if [ "${ATALKD_RUN}" != "no" ]; then
if [ "${PAPD_RUN}" = "yes" ]; then
- ebegin "Stopping papd"
+ echo "Stopping papd"
start-stop-daemon --stop --quiet --exec /usr/sbin/papd
- eend $?
fi
for reg in \
"${ATALK_NAME}:Workstation${ATALK_ZONE}" \
"${ATALK_NAME}:netatalk${ATALK_ZONE}"
do
- ebegin "Unregistering $reg"
+ echo "Unregistering $reg"
/usr/bin/nbpunrgstr "$reg"
- eend $?
done
- ebegin "Stopping atalkd"
+ echo "Stopping atalkd"
start-stop-daemon --stop --quiet --exec /usr/sbin/atalkd
- eend $?
fi
if [ "${CNID_METAD_RUN}" = "yes" ] ; then
- ebegin "Stopping cnid_metad"
+ echo "Stopping cnid_metad"
start-stop-daemon --stop --quiet --exec /usr/sbin/cnid_metad
- eend $?
fi
}
+
+case "$1" in
+ start)
+ start_netatalk
+ ;;
+ stop)
+ stop_netatalk
+ ;;
+ *)
+ echo "Usage: {start|stop}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/packages/netatalk/files/netatalk.conf b/packages/netatalk/files/netatalk.conf
new file mode 100644
index 0000000000..dc0efbc249
--- /dev/null
+++ b/packages/netatalk/files/netatalk.conf
@@ -0,0 +1,44 @@
+# Appletalk configuration
+# Change this to increase the maximum number of clients that can connect:
+AFPD_MAX_CLIENTS=50
+
+# Change this to set the machine's atalk name and zone, the latter containing
+# the '@' sign as first character -- compare with nbp_name(3) if in doubt
+#
+# NOTE: If Netatalk should register AppleTalk services in the standard zone
+# then you need not to specify a zone name here.
+#
+# If your zone has spaces in it, you're better off specifying
+# it in afpd.conf if you realize that your distribution doesn't
+# handle spaces correctly in the startup script. Remember to use
+# quotes here if the zone name contains spaces.
+#
+#ATALK_ZONE="@some zone"
+ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
+
+# specify the Mac and unix charsets to be used
+ATALK_MAC_CHARSET='MAC_ROMAN'
+ATALK_UNIX_CHARSET='LOCALE'
+
+# specify this if you don't want guest, clrtxt, and dhx
+# available options: uams_guest.so, uams_clrtxt.so, uams_dhx.so,
+# uams_randnum.so
+#AFPD_UAMLIST="-U uams_clrtxt.so,uams_dhx.so"
+
+# Change this to set the id of the guest user
+AFPD_GUEST=nobody
+
+# Set which daemons to run (papd is dependent upon atalkd):
+ATALKD_RUN=no
+PAPD_RUN=yes
+CNID_METAD_RUN=yes
+AFPD_RUN=yes
+TIMELORD_RUN=no
+A2BOOT_RUN=no
+
+# Control whether the daemons are started in the background
+ATALK_BGROUND=no
+
+# export the charsets, read form ENV by apps
+export ATALK_MAC_CHARSET
+export ATALK_UNIX_CHARSET
diff --git a/packages/netatalk/netatalk_2.0.3.bb b/packages/netatalk/netatalk_2.0.3.bb
index 4f802dbcf6..0ed580d6f1 100644
--- a/packages/netatalk/netatalk_2.0.3.bb
+++ b/packages/netatalk/netatalk_2.0.3.bb
@@ -1,38 +1,46 @@
SECTION = "net"
-PR = "r0"
+PR = "r1"
LICENSE = "GPL"
-DEPENDS = "cups db openssl libpam"
+DEPENDS = "cups db openssl"
SRC_URI = "http://ovh.dl.sourceforge.net/sourceforge/netatalk/netatalk-${PV}.tar.gz \
file://netatalk-2.0.3-db43.patch;patch=1 \
file://netatalk-2.0.3-newerdb.patch;patch=1 \
file://netatalk-2.0.3-xfs.patch;patch=1 \
- file://init \
- "
+ file://netatalk.conf \
+ file://init"
+
+inherit autotools update-rc.d
+
INITSCRIPT_NAME = "atalk"
INITSCRIPT_PARAMS = "defaults 65"
-inherit autotools update-rc.d
+PACKAGES = "${PN}-atalkd ${PN}-pap ${PN}-timelord ${PN}-dbg ${PN} ${PN}-doc ${PN}-dev"
-do_configure () {
- autoreconf
- ac_cv_header_rpcsvc_rquota_h=no LDFLAGS="-lpthread -L${STAGING_LIBDIR}" ./configure \
- --build=${BUILD_SYS} \
- --host=${HOST_SYS} \
- --target=${TARGET_SYS} \
- --prefix=${prefix} \
- --with-bdb=${STAGING_DIR_TARGET}${layout_exec_prefix} \
- --with-ssl-dir=${STAGING_DIR_TARGET}${layout_exec_prefix} \
- --without-shadow \
- --sysconfdir=${sysconfdir} \
- --disable-nls \
- --disable-static \
- --with-pam \
- --mandir=${mandir}
- cp ${STAGING_BINDIR_NATIVE}/${TARGET_SYS}-libtool ./${TARGET_SYS}-libtool
-}
+RRECOMMENDS_${PN}-atalkd = "kernel-module-appletalk"
+
+FILES_${PN}-atalkd += "${sysconfdir}/netatalk/atalkd.conf \
+ /usr/sbin/atalkd"
+FILES_${PN}-pap += "/usr/bin/pap \
+ ${sysconfdir}/netatalk/papd.conf \
+ /usr/sbin/papd \
+ /usr/bin/papstatus"
+FILES_${PN}-timelord += "/usr/sbin/timelord"
+FILES_${PN}-dbg += "${sysconfdir}/netatalk/uams/.debug"
+
+EXTRA_OECONF += "ac_cv_path_KRB5_CONFIG=no \
+ ac_cv_header_rpcsvc_rquota_h=no \
+ --with-bdb=${STAGING_DIR_TARGET}${layout_exec_prefix} \
+ --enable-timelord \
+ --without-shadow \
+ --enable-static=no \
+ --disable-srvloc \
+ --without-pam \
+ --with-ssl-dir=${STAGING_DIR_TARGET}${layout_exec_prefix}"
+LDFLAGS += "-lpthread -L${STAGING_LIBDIR}"
do_install_append() {
install -D -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/atalk
+ install -D -m 0644 ${WORKDIR}/netatalk.conf ${D}${sysconfdir}/netatalk/netatalk.conf
}