summaryrefslogtreecommitdiff
path: root/data/netatalk
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-10-16 22:33:03 +0000
committerJay Freeman <saurik@saurik.com>2008-10-16 22:33:03 +0000
commit723da617c52176f61c5782fbe0cb5b05169d75ad (patch)
treea624f331bafdf9ac30aeeee77f66246b5b580230 /data/netatalk
parent5f908867983163d4a75b69320db7c11875b24d7d (diff)
Finally finished Netatalk ;P.
git-svn-id: http://svn.telesphoreo.org/trunk@495 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/netatalk')
-rwxr-xr-xdata/netatalk/_metadata/extrainst_13
-rwxr-xr-xdata/netatalk/_metadata/postinst6
-rwxr-xr-xdata/netatalk/_metadata/prerm6
-rwxr-xr-xdata/netatalk/afpd-dns-sd2
-rw-r--r--data/netatalk/com.saurik.afpd.dns-sd.plist7
-rw-r--r--data/netatalk/make.sh3
6 files changed, 23 insertions, 14 deletions
diff --git a/data/netatalk/_metadata/extrainst_ b/data/netatalk/_metadata/extrainst_
new file mode 100755
index 000000000..bcd309e8e
--- /dev/null
+++ b/data/netatalk/_metadata/extrainst_
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [[ $1 == upgrade ]]; then
+ /bin/launchctl unload /System/Library/LaunchDaemons/com.saurik.afpd.dns-sd.plist
+ /bin/launchctl unload /System/Library/LaunchDaemons/net.sourceforge.netatalk.afpd.plist
+fi
+
+if [[ $1 == install || $1 == upgrade ]]; then
+ /bin/launchctl load /System/Library/LaunchDaemons/com.saurik.afpd.dns-sd.plist
+ /bin/launchctl load /System/Library/LaunchDaemons/net.sourceforge.netatalk.afpd.plist
+fi
+
+exit 0
diff --git a/data/netatalk/_metadata/postinst b/data/netatalk/_metadata/postinst
deleted file mode 100755
index a7246567a..000000000
--- a/data/netatalk/_metadata/postinst
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-/bin/launchctl list com.saurik.afpd.dns-sd &>/dev/null ||
- /bin/launchctl load /System/Library/LaunchDaemons/com.saurik.afpd.dns-sd.plist
-/bin/launchctl list net.sourceforge.netatalk.afpd &>/dev/null ||
- /bin/launchctl load /System/Library/LaunchDaemons/net.sourceforge.netatalk.afpd.plist
-exit 0
diff --git a/data/netatalk/_metadata/prerm b/data/netatalk/_metadata/prerm
index 4fd7ef15d..461826ea4 100755
--- a/data/netatalk/_metadata/prerm
+++ b/data/netatalk/_metadata/prerm
@@ -1,6 +1,8 @@
#!/bin/sh
-! /bin/launchctl list com.saurik.afpd.dns-sd &>/dev/null ||
+
+if [[ $1 == remove ]]; then
/bin/launchctl unload /System/Library/LaunchDaemons/com.saurik.afpd.dns-sd.plist
-! /bin/launchctl list net.sourceforge.netatalk.afpd &>/dev/null ||
/bin/launchctl unload /System/Library/LaunchDaemons/net.sourceforge.netatalk.afpd.plist
+fi
+
exit 0
diff --git a/data/netatalk/afpd-dns-sd b/data/netatalk/afpd-dns-sd
deleted file mode 100755
index e5edf731e..000000000
--- a/data/netatalk/afpd-dns-sd
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-exec dns-sd -R "$(hostname)" _afpovertcp._tcp local. 548
diff --git a/data/netatalk/com.saurik.afpd.dns-sd.plist b/data/netatalk/com.saurik.afpd.dns-sd.plist
index c76b10304..e6fb5d129 100644
--- a/data/netatalk/com.saurik.afpd.dns-sd.plist
+++ b/data/netatalk/com.saurik.afpd.dns-sd.plist
@@ -7,7 +7,12 @@
<key>ProgramArguments</key>
<array>
- <string>/usr/libexec/afpd-dns-sd</string>
+ <string>/usr/bin/dns-sd</string>
+ <string>-R</string>
+ <string></string>
+ <string>_afpovertcp._tcp</string>
+ <string>local.</string>
+ <string>548</string>
</array>
<key>OnDemand</key>
diff --git a/data/netatalk/make.sh b/data/netatalk/make.sh
index 0d18da926..f786a3af2 100644
--- a/data/netatalk/make.sh
+++ b/data/netatalk/make.sh
@@ -3,9 +3,6 @@ AR=$(which "${PKG_TARG}-ar") pkg:configure --enable-cups=no --sysconfdir=/etc
make
pkg:install
-pkg: mkdir -p /usr/libexec
-pkg: cp -a %/afpd-dns-sd /usr/libexec
-
pkg: mkdir -p /System/Library/LaunchDaemons
pkg: cp -a %/com.saurik.afpd.dns-sd.plist /System/Library/LaunchDaemons
pkg: cp -a %/net.sourceforge.netatalk.afpd.plist /System/Library/LaunchDaemons