I am working on an embedded system. I wrote an environment generator in bash and it seems to work just fine. However I get some errors in the journal:
May 28 02:03:14 imx6ull14x14evk systemd[121]: /etc/systemd/system-environment-generators/overlayroot-ubifs.sh failed with exit status 32.
May 28 02:03:14 imx6ull14x14evk systemd[121]: Invalid variable assignment "overlay /mnt/user/overlay overlay rw,noatime,lowerdir=...", ignoring.
May 28 02:03:14 imx6ull14x14evk systemd[121]: Invalid variable assignment "overlay / overlay rw,relatime,lowerdir=...", ignoring.
May 28 02:03:14 imx6ull14x14evk systemd[121]: Invalid variable assignment "devtmpfs /orig/dev devtmpfs rw,relatime,size=...", ignoring.
May 28 02:03:14 imx6ull14x14evk systemd[121]: Invalid variable assignment "tmpfs /orig/run tmpfs rw,nosuid,nodev,mode=...", ignoring.
I notice that both stdout and stderr seem to be suppressed. logger doesn't work, maybe because systemd-journald.service has not yet started? Or maybe because logger is from busybox and it is not compatible? I noticed that the poky/yocto defaults are writing to rsyslog from logger, not the systemd journal.
If I turn on systemd.log_level=debug as a kernel boot argument, my errors disappear (disconcerting). My errors are not hurting anything as far as I can tell, but I would like to clean it up. Setting systemd.log_level=debug causes other generators to be noted in the journal:
May 28 02:14:43 imx6ull14x14evk kernel: UBIFS (ubi0:1): FS size: 424099840 bytes (404 MiB, 1670 LEBs), journal size 21331968 bytes (20 MiB, 84 LEBs) mber 2 using ci_hdrck_data_crc mtdparts=gpmi-nand:4m(nandboot),-(nandubi)
3 imx6ull14x14evk kernel: UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
May 28 02:14:43 imx6ull14x14evk kernel: UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID 29F89BD4-13AA-4118-B7B7-2B15D8F97EDB, small LPT model
May 28 02:14:43 imx6ull14x14evk systemd-rc-local-generator[196]: /etc/rc.local does not exist, skipping.
May 28 02:14:43 imx6ull14x14evk systemd-hibernate-resume-generator[195]: Not running in an initrd, quitting.
May 28 02:14:43 imx6ull14x14evk systemd-getty-generator[193]: Automatically adding serial getty for /dev/ttymxc0.
May 28 02:14:43 imx6ull14x14evk systemd-gpt-auto-generator[194]: Neither root nor /usr file system are on a (single) block device. vice= 3.18
le entries: 513 imx6ull14x14evk systemd-fstab-generator[192]: Parsing /etc/fstab...
So how does systemd-rc-local-generator create the message
/etc/rc.local does not exist, skipping
in the journal? Do I have to write my environment generator in C to be able to print messages (I am willing if required)? Can I get messages without setting systemd.log_level=debug?