]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - tools/testosx
Load cups into easysw/current.
[thirdparty/cups.git] / tools / testosx
index af37a09750b75554b4e5c36ca25bd73fe9fb7532..58aa52160c62060aed3195bc4fa08c3c5e45e84a 100755 (executable)
@@ -34,15 +34,26 @@ killall cupsd || exit 0
 EOF
 chmod 755 $pkgdir/Resources/preflight
 
-cat >$pkgdir/Resources/postflight <<EOF
+if test -x /bin/launchctl; then
+       cat >$pkgdir/Resources/postflight <<EOF
 #!/bin/sh
+
+# Remove old startup item, we use launchd now...
+rm -f /System/Library/StartupItems/PrintingServices/PrintingServices
+
+# Tell launchd to reload cupsd...
 launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
 launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist
-sleep 1
-if test -e /private/var/run/cupsd; then
-        chmod g+w,o+w /private/var/run/cupsd
-fi
 EOF
+else
+       cat >$pkgdir/Resources/postflight <<EOF
+#!/bin/sh
+
+# Start cupsd...
+/usr/sbin/cupsd
+EOF
+fi
+
 chmod 755 $pkgdir/Resources/postflight
 
 # Tag the current revision in the plist and web interface files...