diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 15:14:24 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 15:29:45 +0100 |
commit | 29d6678fd546377459ef75cf54abeef5b969b5cf (patch) | |
tree | 8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-core/sysvinit/sysvinit/bootlogd.init | |
parent | da49de6885ee1bc424e70bc02f21f6ab920efb55 (diff) | |
download | poky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz |
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things
and is generally overwhelming. This commit splits it into several
logical sections roughly based on function, recipes.txt gives more
information about the classifications used.
The opportunity is also used to switch from "packages" to "recipes"
as used in OpenEmbedded as the term "packages" can be confusing to
people and has many different meanings.
Not all recipes have been classified yet, this is just a first pass
at separating things out. Some packages are moved to meta-extras as
they're no longer actively used or maintained.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/sysvinit/sysvinit/bootlogd.init')
-rwxr-xr-x | meta/recipes-core/sysvinit/sysvinit/bootlogd.init | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init new file mode 100755 index 0000000000..f8f07a050f --- /dev/null +++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init | |||
@@ -0,0 +1,85 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # bootlogd One of the first scripts to be executed. Starts or stops | ||
4 | # the bootlogd log program. If this script is called as | ||
5 | # "stop-bootlogd", it will stop the daemon instead of | ||
6 | # starting it even when called with the "start" argument. | ||
7 | # | ||
8 | # Version: @(#)bootlogd 2.85-12 21-Mar-2004 miquels@cistron.nl | ||
9 | # | ||
10 | |||
11 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
12 | DAEMON=/sbin/bootlogd | ||
13 | NAME=bootlogd | ||
14 | DESC="Bootlog daemon" | ||
15 | |||
16 | test -f $DAEMON || exit 0 | ||
17 | |||
18 | [ -r /etc/default/bootlogd ] && . /etc/default/bootlogd | ||
19 | |||
20 | ## set -e # not needed | ||
21 | |||
22 | case "$BOOTLOGD_ENABLE" in | ||
23 | [Nn]*) | ||
24 | exit 0 | ||
25 | ;; | ||
26 | esac | ||
27 | |||
28 | STOPPER= | ||
29 | ACTION="$1" | ||
30 | case "$0" in | ||
31 | *stop-bootlog*) | ||
32 | STOPPER=Y | ||
33 | if [ "$ACTION" = start ] | ||
34 | then | ||
35 | ACTION=stop | ||
36 | fi | ||
37 | ;; | ||
38 | esac | ||
39 | |||
40 | case "$ACTION" in | ||
41 | start) | ||
42 | echo -n "Starting $DESC: " | ||
43 | if [ -d /proc/1/. ] | ||
44 | then | ||
45 | umask 027 | ||
46 | start-stop-daemon --start --quiet \ | ||
47 | --exec $DAEMON -- -r | ||
48 | else | ||
49 | $DAEMON -r | ||
50 | fi | ||
51 | echo "$NAME." | ||
52 | ;; | ||
53 | stop) | ||
54 | echo -n "Stopping $DESC: " | ||
55 | start-stop-daemon --stop --quiet --exec $DAEMON | ||
56 | |||
57 | if [ "$STOPPER" ] && [ -f /var/log/boot ] && \ | ||
58 | [ -f /var/log/boot~ ] | ||
59 | then | ||
60 | cd /var/log | ||
61 | chgrp adm boot | ||
62 | savelog -p -c 5 boot > /dev/null 2>&1 | ||
63 | mv boot.0 boot | ||
64 | mv boot~ boot.0 | ||
65 | fi | ||
66 | |||
67 | echo "$NAME." | ||
68 | ;; | ||
69 | restart|force-reload) | ||
70 | echo -n "Restarting $DESC: " | ||
71 | start-stop-daemon --stop --quiet --exec $DAEMON | ||
72 | sleep 1 | ||
73 | start-stop-daemon --start --quiet --exec $DAEMON | ||
74 | echo "$NAME." | ||
75 | ;; | ||
76 | *) | ||
77 | N=${0##*/} | ||
78 | N=${N#[SK]??} | ||
79 | echo "Usage: $N {start|stop|restart|force-reload}" >&2 | ||
80 | exit 1 | ||
81 | ;; | ||
82 | esac | ||
83 | |||
84 | exit 0 | ||
85 | |||