/etc/init.d/bootlogd is in bootlogd 2.88dsf-59.3ubuntu2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | #! /bin/sh
### BEGIN INIT INFO
# Provides: bootlogd
# Required-Start: mountdevsubfs
# X-Start-Before: hostname keymap keyboard-setup procps pcmcia hwclock hwclockfirst hdparm hibernate-cleanup lvm2
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Start or stop bootlogd.
# Description: Starts or stops the bootlogd log program
# which logs boot messages.
### END INIT INFO
PATH=/sbin:/bin # No remote fs at start
DAEMON=/sbin/bootlogd
TMPLOG=/run/bootlog
[ -x "$DAEMON" ] || exit 0
NAME=bootlogd
DESC="boot logger"
BOOTLOGD_OPTS="-c -l $TMPLOG"
. /lib/init/vars.sh
. /lib/lsb/init-functions
# Previously this script was symlinked as "stop-bootlogd" which, when run
# with the "start" argument, should stop bootlogd. Now stop-bootlogd is
# a distinct script, but for backward compatibility this script continues
# to implement the old behavior.
SCRIPTNAME=${0##*/}
SCRIPTNAME=${SCRIPTNAME#[SK]??}
ACTION="$1"
case "$0" in
*stop-bootlog*)
[ "$ACTION" = start ] && ACTION=stop
;;
esac
case "$ACTION" in
start)
# PATH is set above
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
if [ -d /proc/1/. ]
then
umask 027
start-stop-daemon --start --quiet --exec $DAEMON -- \
$BOOTLOGD_OPTS
ES=$?
else
$DAEMON $BOOTLOGD_OPTS
ES=$?
fi
[ "$VERBOSE" != no ] && log_end_msg $ES
;;
stop)
PATH=/bin:/sbin:/usr/bin:/usr/sbin
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --oknodo --stop --quiet --exec $DAEMON
ES=$?
sleep 1
[ "$VERBOSE" != no ] && log_end_msg $ES
if [ -r "$TMPLOG" ]
then
cat "$TMPLOG" >> /var/log/boot
rm -f "$TMPLOG"
fi
if [ -f /var/log/boot ] && [ -f /var/log/boot~ ]
then
[ "$VERBOSE" = no ] || log_action_begin_msg "Moving boot log file"
# bootlogd writes to boot, making backup at boot~
cd /var/log && {
chgrp adm boot || :
savelog -q -p -c 5 boot \
&& mv boot.0 boot \
&& mv boot~ boot.0
}
ES=$?
[ "$VERBOSE" = no ] || log_action_end_msg $ES
fi
;;
restart|force-reload)
/etc/init.d/bootlogd stop
/etc/init.d/bootlogd start
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
exit 3
;;
esac
:
|