svn commit: r289918 - user/ngie/detangle-rc/etc/rc.d
Garrett Cooper
ngie at FreeBSD.org
Sun Oct 25 05:56:23 UTC 2015
Author: ngie
Date: Sun Oct 25 05:56:22 2015
New Revision: 289918
URL: https://svnweb.freebsd.org/changeset/base/289918
Log:
Try to fix the regression introduced in r282145 by making ldconfig only
depend on FILESYSTEMS, then regen the ldconfig hints in mountcritremote
if a remote file system was mounted
TODO: test the change with a diskless /var
Proposed patch for PR: 202726
Modified:
user/ngie/detangle-rc/etc/rc.d/ldconfig
user/ngie/detangle-rc/etc/rc.d/mountcritremote
Modified: user/ngie/detangle-rc/etc/rc.d/ldconfig
==============================================================================
--- user/ngie/detangle-rc/etc/rc.d/ldconfig Sun Oct 25 05:52:53 2015 (r289917)
+++ user/ngie/detangle-rc/etc/rc.d/ldconfig Sun Oct 25 05:56:22 2015 (r289918)
@@ -4,7 +4,7 @@
#
# PROVIDE: ldconfig
-# REQUIRE: mountcritremote FILESYSTEMS
+# REQUIRE: FILESYSTEMS
# BEFORE: DAEMON
. /etc/rc.subr
Modified: user/ngie/detangle-rc/etc/rc.d/mountcritremote
==============================================================================
--- user/ngie/detangle-rc/etc/rc.d/mountcritremote Sun Oct 25 05:52:53 2015 (r289917)
+++ user/ngie/detangle-rc/etc/rc.d/mountcritremote Sun Oct 25 05:56:22 2015 (r289918)
@@ -34,12 +34,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 file systems:'
mount -a -t nfs
echo '.'
@@ -63,6 +66,7 @@ mountcritremote_start()
case "`mount -d -a -t ${fstype}`" in
*mount_${fstype}*)
+ mounted_remote_filesystem=true
echo -n "Mounting ${fsdecr} file systems:"
mount -a -t ${fstype}
echo '.'
@@ -70,9 +74,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
More information about the svn-src-user
mailing list