Sprout from master 2006-02-03 15:46:15 UTC Elan Ruusamäe <glen@pld-linux.org> '- chkconfig must be run in preun, rel 2; STBR'
Delete:
bluez-utils-etc_dir.patch
bluez-utils-home_etc.patch
bluez-utils.init
bluez-utils.sysconfig
+++ /dev/null
-diff -Nru bluez-utils-2.2/rfcomm/parser.y bluez-utils-2.2.new/rfcomm/parser.y
---- bluez-utils-2.2/rfcomm/parser.y Thu Oct 31 10:09:48 2002
-+++ bluez-utils-2.2.new/rfcomm/parser.y Sun Mar 23 18:18:14 2003
-@@ -147,7 +147,11 @@
- if (filename) {
- snprintf(file, MAXPATHLEN, "%s", filename);
- } else {
-- snprintf(file, MAXPATHLEN, "%s/.bluetooth/rfcomm.conf", getenv("HOME"));
-+ char *etc_dir = getenv("HOME_ETC");
-+ if (etc_dir)
-+ snprintf(file, MAXPATHLEN, "%s/.bluetooth/rfcomm.conf", etc_dir);
-+ else
-+ snprintf(file, MAXPATHLEN, "%s/.bluetooth/rfcomm.conf", getenv("HOME"));
-
- if ((getuid() == 0) || (access(file, R_OK) < 0))
- snprintf(file, MAXPATHLEN, "/etc/bluetooth/rfcomm.conf");
+++ /dev/null
-diff -Nru bluez-utils-2.2/rfcomm/parser.y bluez-utils-2.2.new/rfcomm/parser.y
---- bluez-utils-2.2/rfcomm/parser.y Thu Oct 31 10:09:48 2002
-+++ bluez-utils-2.2.new/rfcomm/parser.y Sun Mar 23 18:18:14 2003
-@@ -147,7 +147,11 @@
- if (filename) {
- snprintf(file, MAXPATHLEN, "%s", filename);
- } else {
-- snprintf(file, MAXPATHLEN, "%s/.bluetooth/rfcomm.conf", getenv("HOME"));
-+ char *config_dir = getenv("CONFIG_DIR");
-+ if (config_dir)
-+ snprintf(file, MAXPATHLEN, "%s/bluetooth/rfcomm.conf", config_dir);
-+ else
-+ snprintf(file, MAXPATHLEN, "%s/.bluetooth/rfcomm.conf", getenv("HOME"));
-
- if ((getuid() == 0) || (access(file, R_OK) < 0))
- snprintf(file, MAXPATHLEN, "/etc/bluetooth/rfcomm.conf");
+++ /dev/null
-#!/bin/sh
-#
-# bluetooth Bluetooth subsystem starting and stopping
-#
-# chkconfig: 345 25 90
-#
-# description: Bluetooth subsystem
-#
-# $Id$
-
-
-# Source function library
-. /etc/rc.d/init.d/functions
-
-UART_CONF="/etc/bluetooth/uart"
-[ -f /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth
-
-if [ "$UART_CONF" != "no" -a ! -f "$UART_CONF" ]; then
- UART_CONF="no"
-fi
-
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
- # Check if the service is already running?
- if [ ! -f /var/lock/subsys/bluetooth ]; then
- msg_starting Bluetooth
- if [ -f /usr/sbin/hciattach -a "$UART_CONF" != "no" ]; then
- grep -v '^#' $UART_CONF | while read i; do
- /usr/sbin/hciattach $i
- done
- fi
- daemon /usr/sbin/hcid -f /etc/bluetooth/hcid.conf
- RETVAL=$?
- if [ $RETVAL -ne 0 ]; then
- killproc hciattach >/dev/null 2>&1
- elif [ -x /usr/sbin/sdpd ]; then
- msg_starting "Bluetooth SDP"
- daemon /usr/sbin/sdpd
- RETVAL=$?
- if [ $RETVAL -ne 0 ]; then
- killproc hcid >/dev/null 2>&1
- if [ "$UART_CONF" != "no" ]; then
- killproc hciattach >/dev/null 2>&1
- fi
- fi
- fi
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bluetooth
- else
- msg_already_running Bluetooth
- fi
- ;;
- stop)
- if [ -f /var/lock/subsys/bluetooth ]; then
- if [ -x /usr/sbin/sdpd ]; then
- msg_stopping "Bluetooth SDP"
- killproc sdpd
- fi
- msg_stopping Bluetooth
- killproc hcid
- if [ "$UART_CONF" != "no" ]; then
- killproc hciattach >/dev/null 2>&1
- fi
- rm -f /var/lock/subsys/bluetooth
- else
- msg_not_running Bluetooth
- fi
- ;;
- restart)
- $0 stop
- $0 start
- exit $?
- ;;
- reload|force-reload)
- if [ -f /var/lock/subsys/bluetooth ]; then
- msg_reloading Bluetooth
- killproc hcid -HUP
- RETVAL=$?
- else
- msg_not_running Bluetooth >&2
- exit 7
- fi
- ;;
- status)
- status hcid
- exit $?
- ;;
- *)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
- exit 3
-esac
-
-exit $RETVAL
-
-# This must be last line !
-# vi:syntax=sh:tw=78:ts=8:sw=4
+++ /dev/null
-# Customized settings for Bluetooth
-
-# Define nice level for Bluetooth services
-SERVICE_RUN_NICE_LEVEL="+0"
-
-# remove if you have serial Bluetooth dongles configured in /etc/bluetooth/uart
-# (alternatively you can pass uart configuration file path here)
-UART_CONF="no"