#! /bin/sh
### BEGIN INIT INFO
# Provides:          stop-bootlogd-single
# Required-Start:    $remote_fs
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Stop bootlogd in single user mode
# Description:       See the bootlogd script
### END INIT INFO

PATH=/usr/sbin:/usr/bin:/sbin:/bin
NAME=stop-bootlogd-single
DAEMON=/sbin/bootlogd

[ -x "$DAEMON" ] || exit 0

case "$1" in
  start)
	if [ ! -e /proc/cmdline ] || grep -q '\<single\>' /proc/cmdline
	then
		/etc/init.d/bootlogd stop
	fi
	;;
  stop|restart|force-reload)
	# No-op
	;;
  *)
	echo "Usage: $NAME {start|stop|restart|force-reload}" >&2
	exit 3
	;;
esac

:
