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.

Change-Id: I52c8260a56942a0a355580faf764a8b049681b13
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/classes/obmc-phosphor-image.bbclass b/classes/obmc-phosphor-image.bbclass
index b428205..4575f5b 100644
--- a/classes/obmc-phosphor-image.bbclass
+++ b/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"