summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.d/ldconfig2
-rwxr-xr-xetc/rc.d/mountcritremote16
2 files changed, 14 insertions, 4 deletions
diff --git a/etc/rc.d/ldconfig b/etc/rc.d/ldconfig
index 9ecb172..a657a01 100755
--- a/etc/rc.d/ldconfig
+++ b/etc/rc.d/ldconfig
@@ -4,7 +4,7 @@
#
# PROVIDE: ldconfig
-# REQUIRE: mountcritremote FILESYSTEMS
+# REQUIRE: FILESYSTEMS
# BEFORE: DAEMON
. /etc/rc.subr
diff --git a/etc/rc.d/mountcritremote b/etc/rc.d/mountcritremote
index 2af48b6..dede14f 100755
--- a/etc/rc.d/mountcritremote
+++ b/etc/rc.d/mountcritremote
@@ -35,12 +35,15 @@ mountcritremote_precmd()
mountcritremote_start()
{
+ local mounted_remote_filesystem=false
+
# Mount nfs filesystems.
#
case "`/sbin/mount -d -a -t nfs`" in
'')
;;
*)
+ mounted_remote_filesystem=true
echo -n 'Mounting NFS filesystems:'
mount -a -t nfs
echo '.'
@@ -64,6 +67,7 @@ mountcritremote_start()
case "`mount -d -a -t ${fstype}`" in
*mount_${fstype}*)
+ mounted_remote_filesystem=true
echo -n "Mounting ${fsdecr} filesystems:"
mount -a -t ${fstype}
echo '.'
@@ -71,9 +75,15 @@ mountcritremote_start()
esac
done
- # Cleanup /var again just in case it's a network mount.
- /etc/rc.d/cleanvar quietreload
- rm -f /var/run/clean_var /var/spool/lock/clean_var
+ if $mounted_remote_filesystem; then
+ # Cleanup /var again just in case it's a network mount.
+ /etc/rc.d/cleanvar quietreload
+ rm -f /var/run/clean_var /var/spool/lock/clean_var
+
+ # Regenerate the ldconfig hints in case there are additional
+ # library paths on remote file systems
+ /etc/rc.d/ldconfig quietstart
+ fi
}
load_rc_config $name
OpenPOWER on IntegriCloud