# systemctl list-units --no-legend postg* samb* postfix*
postfix.service loaded active running LSB: Postfix Mail Transport Agent
postgresql.service loaded active exited PostgreSQL RDBMS
postgresql@9.5-main.service loaded active running PostgreSQL Cluster 9.5-main
samba-ad-dc.service loaded active exited LSB: start Samba daemons for the AD DC
Pre-weekend braindump: I've had success with modifying a xenial image like that:
/usr/sbin/ invoke- rc.d:
if ! systemctl --quiet is-active default.target; then
sctl_ args="- -job-mode= ignore- dependencies"
fi
Add multi-user.target to cloud-{ config, final}. service
Then this works:
lxc launch ubuntu-xenial-mod --config= user.user- data="$ (printf "#cloud- config\ npackages: [postgresql, samba, postfix]")" x1
Services start:
# systemctl list-units --no-legend postg* samb* postfix* 9.5-main. service loaded active running PostgreSQL Cluster 9.5-main
postfix.service loaded active running LSB: Postfix Mail Transport Agent
postgresql.service loaded active exited PostgreSQL RDBMS
postgresql@
samba-ad-dc.service loaded active exited LSB: start Samba daemons for the AD DC
and reboot works fine.