#!/bin/bash # # /etc/rc.d/init.d/utmpd # # Starts the utmpd daemon # # chkconfig: 345 25 55 # description: Utmpd daemon # processname: utmpd # export PATH=/bin:/usr/bin:/sbin:/usr/sbin # Source function library. . /etc/rc.d/init.d/functions # See how we were called. # case "$1" in start) show Starting utmpd daemon # Clean up /var/run and create /var/run/utmp so that we can login. #( cd /var/run && find . ! -type d -exec rm -f -- {} \; ) : > /var/run/utmpx : > /var/run/utmp if [ ! -f /var/log/wtmpx ]; then : > /var/log/wtmpx fi daemon utmpd touch /var/lock/subsys/utmpd ;; stop) show Stopping utmpd daemon killproc utmpd rm -f /var/lock/subsys/utmpd ;; reload|restart) $0 stop $0 start ;; status) status utmpd ;; *) echo "Usage: $0 {start|stop|restart|reload|status}" exit 1 esac exit 0