Date: Fri, 7 Feb 2020 00:40:34 +0100 From: Polytropon <freebsd@edvax.de> To: "D'Arcy Cain" <darcy@druid.net> Cc: freebsd-questions@freebsd.org Subject: Re: Mounting /usr/local from NFS Message-ID: <20200207004034.7c771dc5.freebsd@edvax.de> In-Reply-To: <1becbc20-493d-4be0-da50-31cf556ae61f@druid.net> References: <1becbc20-493d-4be0-da50-31cf556ae61f@druid.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 6 Feb 2020 14:12:30 -0600, D'Arcy Cain wrote: > I am not sure why I am having a problem but it may be related to this. > I am mounting /usr/local from a master machine in the office. I also > mount /home and a few local directories. Everything seems to work OK > except that local rc.d scripts aren't running. For example, I have > xdm_enable set in rc.conf but when I boot it doesn't start. I look at > /var/log/messages and I don't see anything about xdm, not even errors. > > After it boots I can do "service xdm restart" and it starts just fine. > > I wonder if this is because /usr/local is mounted too late for rc to see > the scripts in /usr/local/etc/rc.d. I tried to figure out the variable > "mountcritremote" but I can't find any documentation on it. I tried > setting it to "YES" and "/usr/local" but it didn't help. > > The same issue happens with postfix which is the other program I am > running from ports. > > So, first question is, does this seem like a likely explanation for what > I am seeing? Looks like it. > Second question is how do I fix this either way? A solution would be to use /etc/rc.local, which should contain the following: #!/bin/sh /sbin/mount <your NFS shares> for SERVICE in "postfix xdm <and other services"; do /usr/sbin/service ${SERVICE} start done exit 0 When /etc/rc.local is being run - I'm not sure! - it could be that the mounts for NFS have already taken place, so you might be able to omit the manual NFS mount step. However, this is not to be considered a clean solution... ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200207004034.7c771dc5.freebsd>