Sunday, July 30, 2006

xfs daemon startup for HPUX 11.x

#!/sbin/sh

#
# xfs startup: Startup and kill script for the X font server
#

PATH=/sbin:/usr/sbin:/usr/bin
export PATH

cfn=`env | grep "^CONFIG_FILE_NAME="`
if [ "$cfn" = "" ]
then
CONFIG_FILE_NAME=/etc/X11/fs/config
export CONFIG_FILE_NAME
fi

if [ -r /etc/rc.config.d/xfs ]
then . /etc/rc.config.d/xfs
fi

case "$1" in

"start_msg") echo "Starting X Font Server at TCP port 7000" ;;

"start") if [ "$RUN_X_FONT_SERVER" -ne 0 ]
then
/usr/bin/X11/xfs -config "$CONFIG_FILE_NAME" -port 7000 -daemon -quiet_if_addrinuse && exit 0
fi
exit 2 ;;

"stop_msg") echo "Terminating X Font Server" ;;

"stop") PIDS=`UNIX95=1 ps -eo pid,args | awk '$2 == "/usr/bin/X11/xfs" {print $1}'`
[ -z "$PIDS" ] && exit 0
KILL_OK="YES"
for i in "$PIDS"
do
if kill $i; then
continue
else
KILL_OK="NO"
echo "Unable to stop process $i"
fi
done
if [ "$KILL_OK" = "YES" ]; then
return 0
else
return 1
fi ;;

esac

exit 0;

Comments:
Guys, this web page just saved my life!
I mv the file to tmp while I was in single user mode boot :(.
Thanks again!!!!
 
thanks for that!
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?