~ubuntu-branches/ubuntu/karmic/sysvinit/karmic-updates

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2009-09-07 19:56:53 UTC
  • mfrom: (1.1.4 upstream) (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090907195653-2i6t0j91wfbf1f0d
Tags: 2.87dsf-4ubuntu1
* Merge from debian unstable, remaining changes:
  - Support Cell processor:
    + debian/initscripts/postinst: Create spu system group and /spu mount
      point if we are running on a Cell processor.
    + debian/initscripts/etc/init.d/mountkernfs.sh: Mount spufs if Cell
      processor is detected.
    + debian/initscripts/lib/init/mount-functions.sh: Modprobe spufs
      if not available.
    + debian/control: Add initscripts dependency 'passwd' for groupadd.
    (Forwarded to Debian #483399)
  - Use tmpfs mounts for /var/lock and /var/run:
    + debian/initscripts/share/default.rcS: Enable RAMRUN and RAMLOCK by
      default.
    + debian/initscripts.postinst: Enable RAMRUN and RAMLOCK in
      /etc/default/rcS on upgrades. This needs to be kept until the next
      LTS.
    + debian/initscripts/etc/init.d/mountkernfs.sh: Propagate files from the
      initramfs to our new /var/run, so that we can populate
      /var/run/sendsigs.omit from initramfs.
  - Boot ordering differences:
    + mountkernfs.sh: 02 -> 01
    + mountdevsubfs.sh: 04 -> 11
    + bootlogd: disabled by default
    + checkroot.sh: 10 -> 20
    + mtab.sh: 12 -> 22
  - debian/patches/91_sulogin_lockedpw.dpatch: Disable "root account is
    locked" warning, since this is the default in Ubuntu. Document this in
    sulogin.8.
  - debian/control: Drop Essential: yes from packages since we use Upstart.
  - debian/control: Conflict/Replace sysvconfig which has also previously
    provided service(8).
  - debian/control, debian/rules: Previous name for sysvinit-utils was
    'sysvutils' in Ubuntu, so Conflict/Replace/Provide it. Also create a
    dummy sysvutils package, since Hardy has reverse versioned dependencies
    to it. This needs to be kept until after the next LTS.
  - debian/control: Depend on lsb-base (>= 3.2-14) for status_of_proc()
    function.
  - debian/initscripts/etc/init.d/checkfs.sh: Don't depend on hwclockfirst
    which Ubuntu does not have.
  - debian/initscripts/etc/init.d/mountkernfs.sh: Always mount devpts, and
    do not touch /dev/ptmx (which is already managed by udev).
  - debian/initscripts/etc/init.d/mountkernfs.sh: mount fusectl if it is
    available
  - debian/initscripts/etc/init.d/mountkernfs.sh: mount securityfs if it is
    available. This allows for easier AppArmor confinement of applications
    early in the boot process. LP: #399954
  - debian/initscripts/etc/init.d/mountkernfs.sh: mount debugfs if it is
    available.
  - debian/initscripts/etc/init.d/ondemand: Sleep for 60 seconds, then
    set CPU Frequency Scaling governor to "ondemand".   LP: #341573.
  - debian/initscripts/etc/init.d/umountfs: Don't unmount filesystems
    that precede root or use force for some mountpoints.
  - debian/initscripts/etc/network/if-up.d/mountnfs: Rename ifstate
    file to /var/run/network/ifstate
  - ./debian/initscripts/lib/init/usplash-fsck-functions.sh: Use blkid,
    vol_id is gone.
  - debian/initscripts.{pre,postinst}: waitnfs.sh -> mountnfs.sh renaming
    transition. This needs to be kept until after the next LTS.

LP: #32455, #94120, #160197, #382097 (amongst others).

* debian/sysv-rc/sbin/update-rc.d: Dropped support for "multiuser"
  command-line option.
* debian/rules: Compat symlink from /usr/bin/service to /usr/sbin/service
* debian/initscripts.postinst: Transition from bootlogs.sh to bootlogs

* debian/sysv-rc.postinst: Don't try and use insserv by default, though
  everything's in place for you to try if you like.  It can be activated
  with:
      USEINSSERV=yes dpkg-reconfigure sysv-rc

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
: