summaryrefslogtreecommitdiffstats
path: root/package/netatalk/S50netatalk
diff options
context:
space:
mode:
authorMaxime Hadjinlian <maxime.hadjinlian@gmail.com>2012-04-26 09:41:47 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2012-04-30 10:35:22 +0200
commitbd9eba9ce307d0a634737dede8d9b18d981f2f69 (patch)
tree51fd33795c9290d8f7127134832c6397afb57d6c /package/netatalk/S50netatalk
parent0242ae4c6b7d1daf85a5f0c191394b0a15f95c54 (diff)
downloadbuildroot-novena-bd9eba9ce307d0a634737dede8d9b18d981f2f69.tar.gz
buildroot-novena-bd9eba9ce307d0a634737dede8d9b18d981f2f69.zip
Add Netatalk
This patch add the Netatalk package to Buildroot. [Peter: fix download URL, force c99 mode, tweak help text] Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/netatalk/S50netatalk')
-rwxr-xr-xpackage/netatalk/S50netatalk43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/netatalk/S50netatalk b/package/netatalk/S50netatalk
new file mode 100755
index 000000000..94bb161ae
--- /dev/null
+++ b/package/netatalk/S50netatalk
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Start netatalk daemon (aftpd && cnid_metad)
+#
+
+AFPD_UAMLIST="-U uams_dhx2.so,uams_clrtxt.so"
+
+start() {
+ echo -n "Starting Netatalk services (this will take a while): "
+ echo "Starting afpd"
+ echo -n " afpd"
+ start-stop-daemon -S -q -p /var/run/afpd.pid --exec /usr/sbin/afpd -- $AFPD_UAMLIST -g nobody -c 50
+ echo -n " cnid_metad"
+ start-stop-daemon -S -q -p /var/run/cnid_metad.pid --exec /usr/sbin/cnid_metad -- -l log_note
+ echo "."
+}
+
+stop(){
+ echo -n "Stopping Netatalk Daemons:"
+ echo -n " afpd"
+ start-stop-daemon -K -q -p /var/run/afpd.pid
+ echo -n " cnid_metad"
+ start-stop-daemon -K -q -p /var/run/cnid_metad.pid
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ start
+ stop
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+