Free Hosting Online for WorkStations

< Previous | Contents | Next >

D.15. /etc/rc.d/init.d/sysklogd‌


#!/bin/sh

########################################################################

# Begin sysklogd

#

# Description : Sysklogd loader

#

#!/bin/sh

########################################################################

# Begin sysklogd

#

# Description : Sysklogd loader

#


# Authors

#

# Update

#

# Version

#

# Authors

#

# Update

#

# Version

#


########################################################################

########################################################################


### BEGIN INIT INFO

# Provides:

# Required-Start:

# Should-Start:

# Required-Stop:

# Should-Stop:

# Default-Start:

# Default-Stop:

# Short-Description:

# Description:

#

# X-LFS-Provided-By:

### END INIT INFO

### BEGIN INIT INFO

# Provides:

# Required-Start:

# Should-Start:

# Required-Stop:

# Should-Stop:

# Default-Start:

# Default-Stop:

# Short-Description:

# Description:

#

# X-LFS-Provided-By:

### END INIT INFO


# Note: sysklogd is not started in runlevel 2 due to possible

# remote logging configurations

. /lib/lsb/init-functions case "${1}" in

start)

log_info_msg "Starting system log daemon..." parms=${SYSKLOGD_PARMS-'-m 0'}

start_daemon /sbin/syslogd $parms evaluate_retval


log_info_msg "Starting kernel log daemon..."

# Note: sysklogd is not started in runlevel 2 due to possible

# remote logging configurations

. /lib/lsb/init-functions case "${1}" in

start)

log_info_msg "Starting system log daemon..." parms=${SYSKLOGD_PARMS-'-m 0'}

start_daemon /sbin/syslogd $parms evaluate_retval


log_info_msg "Starting kernel log daemon..."



start_daemon /sbin/klogd evaluate_retval

;;


stop)

log_info_msg "Stopping kernel log daemon..." killproc /sbin/klogd

evaluate_retval


log_info_msg "Stopping system log daemon..." killproc /sbin/syslogd

evaluate_retval

;;


reload)

log_info_msg "Reloading system log daemon config file..." pid=`pidofproc syslogd`

kill -HUP "${pid}" evaluate_retval

;;


restart)

${0} stop sleep 1

${0} start

;;


status)

statusproc /sbin/syslogd statusproc klogd

;;


*)

echo "Usage: ${0} {start|stop|reload|restart|status}" exit 1

;;

esac exit 0

# End sysklogd

start_daemon /sbin/klogd evaluate_retval

;;


stop)

log_info_msg "Stopping kernel log daemon..." killproc /sbin/klogd

evaluate_retval


log_info_msg "Stopping system log daemon..." killproc /sbin/syslogd

evaluate_retval

;;


reload)

log_info_msg "Reloading system log daemon config file..." pid=`pidofproc syslogd`

kill -HUP "${pid}" evaluate_retval

;;


restart)

${0} stop sleep 1

${0} start

;;


status)

statusproc /sbin/syslogd statusproc klogd

;;


*)

echo "Usage: ${0} {start|stop|reload|restart|status}" exit 1

;;

esac exit 0

# End sysklogd


Top OS Cloud Computing at OnWorks: