meta-phosphor: Disable use of pager for output of systemd tools

Prevent systemd from garbling its output with control characters that
busybox doesn't interpret.

(From meta-phosphor rev: b51d6e3322ea6cfa93e99c74663b7fb9923c2f65)

Change-Id: I2dddce5bef6f41058574904193976ca74f0b0ac9
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass
index b428205..4575f5b 100644
--- a/meta-phosphor/classes/obmc-phosphor-image.bbclass
+++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass
@@ -105,6 +105,13 @@
 }
 ROOTFS_POSTPROCESS_COMMAND += "remove_etc_version ; "
 
+# Disable the pager to prevent systemd injecting control characters into the
+# output stream that are not interpreted by busybox tools.
+disable_systemd_pager() {
+        echo -e "SYSTEMD_PAGER=\nexport SYSTEMD_PAGER" >> ${IMAGE_ROOTFS}${sysconfdir}/profile
+}
+ROOTFS_POSTPROCESS_COMMAND += "disable_systemd_pager ; "
+
 # The shadow recipe provides the binaries(like useradd, usermod) needed by the
 # phosphor-user-manager.
 ROOTFS_RO_UNNEEDED_remove = "shadow"