guests/tasks/base.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+)
You can notice it by looking for this message while booting:
"Oct 23 08:31:19 libvirt-freebsd-10 sm-mta[667]: My unqualified host
name (libvirt-freebsd-10) unknown; sleeping for retry"
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
guests/tasks/base.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml
index a71e66d..48455dd 100644
--- a/guests/tasks/base.yml
+++ b/guests/tasks/base.yml
@@ -118,6 +118,19 @@
hostname:
name: '{{ inventory_hostname }}'
+# On FreeBSD sendmail is enabled by default and it expects fully qualified
+# hostname. By disabling sendmail we will avoid sendmail to trying to resolve
+# the hostname while booting which takes several seconds.
+- name: Disable sendmail
+ lineinfile:
+ path: /etc/rc.conf
+ create: yes
+ backup: yes
+ regexp: '^sendmail_enable.*'
+ line: 'sendmail_enable="NONE"'
+ when:
+ - os_name == 'FreeBSD'
+
- name: Configure ssh access for the root user
authorized_key:
user: root
--
2.13.6
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On Mon, 2017-10-23 at 10:35 +0200, Pavel Hrdina wrote: > +- name: Disable sendmail > + lineinfile: > + path: /etc/rc.conf > + create: yes > + backup: yes > + regexp: '^sendmail_enable.*' > + line: 'sendmail_enable="NONE"' > + when: > + - os_name == 'FreeBSD' According to rc.sendmail(8), setting sendmail_enable to NONE is deprecated: you're supposed to disable each part of sendmail separately, as outlined in [1]. Note that sshd is started right before sendmail: ... Performing sanity check on sshd configuration. Starting sshd. Starting sendmail_submit. Oct 23 14:11:43 libvirt-freebsd-11 sm-mta[664]: My unqualified... so the delay in starting sendmail is not affecting your ability to use the machine - unless you need to log in on the serial console, which you really shouldn't for regular operation anyway. All in all, I think we can leave things as they are. [1] https://www.freebsd.org/doc/handbook/mail-changingmta.html -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On Mon, Oct 23, 2017 at 04:16:05PM +0200, Andrea Bolognani wrote: > On Mon, 2017-10-23 at 10:35 +0200, Pavel Hrdina wrote: > > +- name: Disable sendmail > > + lineinfile: > > + path: /etc/rc.conf > > + create: yes > > + backup: yes > > + regexp: '^sendmail_enable.*' > > + line: 'sendmail_enable="NONE"' > > + when: > > + - os_name == 'FreeBSD' > > According to rc.sendmail(8), setting sendmail_enable to NONE is > deprecated: you're supposed to disable each part of sendmail > separately, as outlined in [1]. > > Note that sshd is started right before sendmail: > > ... > Performing sanity check on sshd configuration. > Starting sshd. > Starting sendmail_submit. > Oct 23 14:11:43 libvirt-freebsd-11 sm-mta[664]: My unqualified... > > so the delay in starting sendmail is not affecting your ability > to use the machine - unless you need to log in on the serial console, > which you really shouldn't for regular operation anyway. > > All in all, I think we can leave things as they are. Yes, I noticed that sshd is started before sendmail, but I didn't know (properly checked) that setting it to "NONE" is deprecated. From the man page we would need to set 4 options to "NO" which is not worth it. Other possible solution would be to set hostname to $domname.local, that would make sendmail happy as well. Pavel -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On Mon, 2017-10-23 at 16:52 +0200, Pavel Hrdina wrote: > Yes, I noticed that sshd is started before sendmail, but I didn't know > (properly checked) that setting it to "NONE" is deprecated. From the > man page we would need to set 4 options to "NO" which is not worth it. Agreed. > Other possible solution would be to set hostname to $domname.local, > that would make sendmail happy as well. This is a much smaller change, so the effort / gain ratio seems reasonable. Personally I wouldn't bother, but if the console delay bugs you enough to write a patch I won't have a problem with it :) -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2025 Red Hat, Inc.