Fix for to the startup service problem on upgrade.

Fix for circular dependency between CASA and Gnome Keyring.
Fix for yast grey out button.
This commit is contained in:
Cameron (Kamran) Mashayekhi
2006-05-22 21:14:34 +00:00
parent a601b19764
commit 0e2f327e7c
22 changed files with 339 additions and 190 deletions

View File

@@ -11,10 +11,8 @@
# Short-Description: miCASA daemon
# Description: miCASA daemon
### END INIT INFO
MICASAD_BIN=/usr/sbin/micasad.sh
MICASAD_PID=/var/run/micasad.pid
MICASAD_MONO=/usr/bin/mono
MICASAD_BIN=/usr/sbin/micasad.sh
test -x $MICASAD_BIN || exit 5
. /etc/rc.status
@@ -31,16 +29,39 @@ test -x $MICASAD_BIN || exit 5
# First reset status of this service
rc_reset
function pid_exists()
{
test -f /var/run/micasad.pid 2> /dev/null
}
function process_running()
{
kill -0 `cat /var/run/micasad.pid` 2> /dev/null
}
function is_running()
{
pid_exists && process_running
}
case "$1" in
start)
echo "Starting miCASA daemon"
/sbin/startproc -f $MICASAD_BIN
if ! is_running; then \
echo -n "Starting miCASA daemon"
$MICASAD_BIN
fi
# Remember status and be verbose
rc_status -v
;;
stop)
echo "Shutting down micasad "
killproc -p $MICASAD_PID -TERM $MICASAD_MONO
if is_running; then \
echo -n "Shutting down miCASA daemon"
#killproc -TERM $MICASAD_BIN
pid=`cat /var/run/micasad.pid` >/dev/null 2>&1
kill -s TERM $pid >/dev/null 2>&1
fi
# Remember status and be verbose
rc_status -v
@@ -87,8 +108,12 @@ case "$1" in
rc_status
;;
status)
echo "Checking micasad service ..."
checkproc -p $MICASAD_PID $MICASAD_BIN
echo -n "Checking miCASA daemon"
if pid_exists && ! process_running 2> /dev/null; then \
rc_failed 1
elif ! pid_exists && ! process_running 2> /dev/null; then \
rc_failed 3
fi
rc_status -v
;;