clearlinux / micro-config-drive

An alternative and small cloud-init implementation in C
Other
45 stars 17 forks source link

Add a newline after hostname entry #60

Closed bwarden closed 1 year ago

bwarden commented 1 year ago

Always add a newline after printing the hostname: entry, just in case userdata API call returns just the hostname. Update the test data to just such a bare hostname.

Fixes #59

bwarden commented 1 year ago

Prettier solution would be to make write_lines() check that the last character it writes is a newline, adding it if not.

bwarden commented 1 year ago

Reworked to make write_lines() do the work, and took out my extraneous newline added after SSH keys.