#!/bin/sh

source /etc/sysconfig/config
source /etc/sysconfig/helpers/functions

ERR=0;

case "$1" in
    "start")
        if [ ! -r /proc/net/unix ]; then 
            load_module unix
            if [ "X$?" != "X0" ]; then ERR=1; fi
        fi
        /sbin/syslogd -S -C;
        if [ "X$?" != "X0" ]; then ERR=2; fi
        /sbin/klogd;
        if [ "X$?" != "X0" ]; then ERR=3; fi
        if [ "X${ERR}" = "X0" ]; then 
            while [ ! -r /dev/log ]; do 
                usleep 10000; 
            done
        fi
        ;;
    "stop")
        exit 0;
        ;;
    *)
        echo "Syntax is $0 start | stop"
        exit 255;
        ;;
esac

exit ${ERR};
