~ubuntu-branches/debian/experimental/sysvinit/experimental

« back to all changes in this revision

Viewing changes to debian/src/initscripts/etc/init.d/bootlogs

  • Committer: Bazaar Package Importer
  • Author(s): Petter Reinholdtsen
  • Date: 2009-09-13 00:13:49 UTC
  • Revision ID: james.westby@ubuntu.com-20090913001349-c4hnvhp0titxdpw9
Tags: 2.87dsf-5
* Uploading to experimental, to test the new build rules.

* Make sysv-rc postinst report detected problems to stderr too when
  failing to migrate.
* Fix typo in error message from postinst (Closes: #545409).
* Make initscripts depend on sysvinit-utils (>= 2.86.ds1-64), to
  make sure the fstab-decode program is available (Closes: #545356).
* Make sure the calls to 'update-rc.d X remove' in initscripts
  postinst do not ignore errors (Closes: #406361).
* Make sysvinit depend on sysvinit-utils (>= 2.86.ds1-66) to avoid
  that bootlogd disappear during partial upgrades (Closes: #545368).
* Restructure source package to make it possible to use debhelper in
  the common way to build the source, by moving debian/initscripts/
  and debian/sysv-rc/ into debian/src/.  Restructure build rules to
  use debhelper more, and migrate to debhelper 7.
* New patch 98_installtarget.patch to improve the sysvinit install
  target.
* Remove /etc/init.d/.depend.* in prerm, not postrm, to avoid
  surprises.
* Remove /var/lib/update-rc.d/* when the package is purged.
* Change cut-off point for the trimmed changelog entries in
  sysvinit-utils, initscripts and sysv-rc from version 2.84-3 to
  version 2.86.ds1-47, to reduce the package sizes.
* Drop hurd specific dependency on libc0.3 (>= 2.3.2.ds1-12).  It is
  no longer needed according to Michael Bunk.  Patch from Michael
  Biebl.
* Remove information about scripts in /var/lib/update-rc.d/ when
  their runlevel symlinks are removed (Closes: #545949).  Remove
  such files left behind earlier during upgrade.
* Bootlogd now starts as late as possible (Closes: #265801)
* Drop the binary /lib/init/readlink from initscripts and depend on
  coreutils (>= 5.93) instead.  Adjust scripts to use the program
  from coreutils from now on (Closes: #239342).
* Make sure insserv exit values propagate through update-rc.d to make
  sure packages with errors fail to install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
### BEGIN INIT INFO
 
3
# Provides:          bootlogs
 
4
# Required-Start:    hostname $local_fs
 
5
# Required-Stop:
 
6
# Should-Start:      gdm kdm xdm ldm sdm
 
7
# Default-Start:     1 2 3 4 5
 
8
# Default-Stop:
 
9
# Short-Description: Log file handling to be done during bootup.
 
10
# Description:       Various things that don't need to be done particularly
 
11
#                    early in the boot, just before getty is run.
 
12
### END INIT INFO
 
13
 
 
14
PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
15
[ "$DELAYLOGIN" ] || DELAYLOGIN=yes
 
16
. /lib/init/vars.sh
 
17
 
 
18
do_start () {
 
19
        # Update motd
 
20
        uname -snrvm > /var/run/motd
 
21
        [ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd
 
22
 
 
23
        # Save kernel messages in /var/log/dmesg
 
24
        if which dmesg >/dev/null 2>&1
 
25
        then
 
26
                [ -f /var/log/dmesg ] && savelog -q -p -c 5 /var/log/dmesg
 
27
                dmesg -s 524288 > /var/log/dmesg
 
28
                chgrp adm /var/log/dmesg || :
 
29
        elif [ -c /dev/klog ]
 
30
        then
 
31
                [ -f /var/log/dmesg ] && savelog -q -p -c 5 /var/log/dmesg
 
32
                dd if=/dev/klog of=/var/log/dmesg &
 
33
                sleep 1
 
34
                kill $!
 
35
                [ -f /var/log/dmesg ] && { chgrp adm /var/log/dmesg || : ; }
 
36
        fi
 
37
 
 
38
        #
 
39
        #       Save udev log in /var/log/udev
 
40
        #
 
41
        if [ -e /dev/.udev.log ]
 
42
        then
 
43
                mv -f /dev/.udev.log /var/log/udev
 
44
        fi
 
45
}
 
46
 
 
47
do_status () {
 
48
        if [ -f /var/run/motd ] && [ ! -f /dev/.udev.log ] ; then
 
49
                return 0
 
50
        else
 
51
                return 4
 
52
        fi
 
53
}
 
54
 
 
55
case "$1" in
 
56
  start|"")
 
57
        do_start
 
58
        ;;
 
59
  restart|reload|force-reload)
 
60
        echo "Error: argument '$1' not supported" >&2
 
61
        exit 3
 
62
        ;;
 
63
  stop)
 
64
        # No-op
 
65
        ;;
 
66
  status)
 
67
        do_status
 
68
        exit $?
 
69
        ;;
 
70
  *)
 
71
        echo "Usage: bootmisc.sh [start|stop]" >&2
 
72
        exit 3
 
73
        ;;
 
74
esac
 
75
 
 
76
: