summaryrefslogtreecommitdiff
path: root/initramfs-init
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-02-26 11:03:29 +0200
committerTimo Teras <timo.teras@iki.fi>2009-02-26 11:03:29 +0200
commit8069f0b1938fb66b10098627a3e3166f69c0e166 (patch)
treeebe4e10d4269a0707e3e157d70bbfcdb69ab394f /initramfs-init
parent52864ab4822b3d5ea5141d5c46edea6403438693 (diff)
downloadabuild-8069f0b1938fb66b10098627a3e3166f69c0e166.tar.gz
abuild-8069f0b1938fb66b10098627a3e3166f69c0e166.tar.bz2
abuild-8069f0b1938fb66b10098627a3e3166f69c0e166.tar.xz
abuild-8069f0b1938fb66b10098627a3e3166f69c0e166.zip
initramfs: bootchart integration with init
modifications to makefile and initramfs init that were left out from previous commit.
Diffstat (limited to 'initramfs-init')
-rwxr-xr-xinitramfs-init13
1 files changed, 13 insertions, 0 deletions
diff --git a/initramfs-init b/initramfs-init
index 841e075..4bd64df 100755
--- a/initramfs-init
+++ b/initramfs-init
@@ -70,6 +70,13 @@ for i in `cat /proc/cmdline` ; do
esac
done
+# start bootcharting if wanted
+if [ -n "$KOPT_chart" ]; then
+ ebegin "Starting bootchart logging"
+ /sbin/bootchartd init "$NEWROOT"
+ eend 0
+fi
+
ALPINE_DEV=${KOPT_alpine_dev%%:*}
ALPINE_DEV_FS=${KOPT_alpine_dev##*:}
if [ "$ALPINE_DEV_FS" = "$ALPINE_DEV" ]; then
@@ -193,6 +200,12 @@ if ! [ -f $NEWROOT/etc/apk/repositories ]; then
cp /etc/apk/repositories $NEWROOT/etc/apk/repositories
fi
+# newroot is done, signal bootchartd to relocate there
+# if bootcharting is done
+if [ -n "$KOPT_chart" ]; then
+ killall -USR2 bootchartd
+fi
+
# switch over to new root
cat /proc/mounts | while read DEV DIR TYPE OPTS ; do
if [ "$DIR" != "/" -a "$DIR" != "$NEWROOT" -a -d "$DIR" ]; then