]>
Commit | Line | Data |
---|---|---|
19255c4d ER |
1 | --- bootchart-0.9/script/bootchartd 2006-12-05 23:34:46.817310332 +0200 |
2 | +++ bootchart-0.9/script/bootchartd 2006-12-08 13:35:59.820678167 +0200 | |
3 | @@ -37,7 +37,7 @@ | |
4 | { | |
5 | # Make sure only a single instance is running | |
6 | [ -f "$BOOTLOG_LOCK" ] && return | |
7 | - | |
8 | + | |
9 | # Mount the temporary file system for log file storage. If possible, | |
10 | # a temporary directory is created. In most cases though (i.e. during | |
11 | # boot), a tmpfs is mounted in /mnt. The mount point is immediately | |
12 | @@ -58,7 +58,7 @@ | |
13 | > kernel_pacct | |
14 | accton kernel_pacct | |
15 | fi | |
16 | - | |
17 | + | |
18 | # Wait for /proc to be mounted | |
19 | while [ ! -f /proc/stat ]; do sleep $SAMPLE_PERIOD; done | |
20 | sleep $SAMPLE_PERIOD | |
21 | @@ -216,17 +216,37 @@ | |
22 | # init(1). | |
23 | IN_INIT="yes" | |
24 | echo "Starting bootchart logging" | |
25 | - start & | |
26 | - | |
27 | - # Optionally, an alternative init(1) process may be specified using | |
28 | - # the kernel command line (e.g. "bootchart_init=/sbin/initng") | |
29 | - init="/sbin/init" | |
30 | - for i in $@; do | |
31 | - if [ "${i%%=*}" = "bootchart_init" ]; then | |
32 | - init="${i#*=}" | |
33 | - break | |
34 | + | |
35 | + # With 2.6.18 i had this in environment! | |
36 | + if [ -n "$bootchart_init" ]; then | |
37 | + init=$bootchart_init | |
38 | + start & | |
39 | + | |
40 | + else | |
41 | + init="/sbin/init" | |
42 | + | |
43 | + # get the cmdline from /proc/cmdline | |
44 | + if [ ! -f /proc/cmdline ]; then | |
45 | + mount -n -t proc none /proc | |
46 | + UMOUNT_PROC=yes | |
47 | + fi | |
48 | + cmdline=$(cat /proc/cmdline) | |
49 | + if [ "$UMOUNT_PROC" = yes ]; then | |
50 | + umount -n /proc | |
51 | fi | |
52 | - done | |
53 | + | |
54 | + start & | |
55 | + | |
56 | + # Optionally, an alternative init(1) process may be specified using | |
57 | + # the kernel command line (e.g. "bootchart_init=/sbin/initng") | |
58 | + for i in $cmdline; do | |
59 | + if [ "${i%%=*}" = "bootchart_init" ]; then | |
60 | + init="${i#*=}" | |
61 | + break | |
62 | + fi | |
63 | + done | |
64 | + fi | |
65 | + | |
66 | exec $init $* | |
67 | fi | |
68 | ||
69 | @@ -247,7 +267,10 @@ | |
70 | killall -USR1 bootchartd | |
71 | ;; | |
72 | *) | |
73 | - echo $"Usage: $0 {init|start|stop}" | |
74 | + # Source function library | |
75 | + . /etc/rc.d/init.d/functions | |
76 | + | |
77 | + msg_usage "$0 {init|start|stop}" | |
78 | ;; | |
79 | esac | |
80 |