From: Sebastien Bacher Date: Mon, 2 Feb 2015 14:48:40 +0000 (+0100) Subject: bootchart: Ensure that systemd is the init called after using bootchart X-Git-Tag: v219~195 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=6e1bf7ab998e30b23202192b5b47c119e7a3697d bootchart: Ensure that systemd is the init called after using bootchart When booting with systemd-bootchart, default to call the systemd binary rather than the init binary on disk, which might be another init system. Collecting data only works with booting systemd. --- diff --git a/man/bootchart.conf.xml b/man/bootchart.conf.xml index a364826bb..e11ccb52f 100644 --- a/man/bootchart.conf.xml +++ b/man/bootchart.conf.xml @@ -124,7 +124,7 @@ Init=[path] Configures bootchart to run a non-standard - binary instead of /sbin/init. This + binary instead of /usr/lib/systemd/systemd. This option is only relevant if bootchart was invoked from the kernel command line with init=/usr/lib/systemd/systemd-bootchart. diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml index 0068e928a..ff86be2ad 100644 --- a/man/systemd-bootchart.xml +++ b/man/systemd-bootchart.xml @@ -116,7 +116,7 @@ systemd-bootchart instead of the init process. In turn, systemd-bootchart - will invoke /sbin/init. + will invoke /usr/lib/systemd/systemd. @@ -218,7 +218,7 @@ Use this init binary. Defaults to - /sbin/init. + /usr/lib/systemd/systemd. diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c index 0808ba44e..b49e2c923 100644 --- a/src/bootchart/bootchart.c +++ b/src/bootchart/bootchart.c @@ -76,7 +76,7 @@ int sysfd=-1; #define DEFAULT_HZ 25.0 #define DEFAULT_SCALE_X 100.0 /* 100px = 1sec */ #define DEFAULT_SCALE_Y 20.0 /* 16px = 1 process bar */ -#define DEFAULT_INIT "/sbin/init" +#define DEFAULT_INIT ROOTLIBDIR "/systemd/systemd" #define DEFAULT_OUTPUT "/run/log" /* graph defaults */ @@ -326,7 +326,7 @@ int main(int argc, char *argv[]) { /* * If the kernel executed us through init=/usr/lib/systemd/systemd-bootchart, then * fork: - * - parent execs executable specified via init_path[] (/sbin/init by default) as pid=1 + * - parent execs executable specified via init_path[] (/usr/lib/systemd/systemd by default) as pid=1 * - child logs data */ if (getpid() == 1) {