Mounting /usr/local from NFS
Polytropon
freebsd at edvax.de
Thu Feb 6 23:40:52 UTC 2020
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, ...
More information about the freebsd-questions
mailing list