configure: dragonfly oddly defaults to /usr/libexec
authorRoy Marples <roy@marples.name>
Sun, 8 Sep 2019 14:47:43 +0000 (15:47 +0100)
committerRoy Marples <roy@marples.name>
Sun, 8 Sep 2019 14:47:43 +0000 (15:47 +0100)
Requries /usr mounted ofc. Seems they don't support a NFS root.

configure

index a890cf0dc634e047604ab3001248249c27f75d6b..b70a6446ccd4d4b84bee8a9721f5f1fbe62ea578 100755 (executable)
--- a/configure
+++ b/configure
@@ -44,42 +44,8 @@ for x do
        esac
 done
 
-if [ -z "$LIBEXECDIR" ]; then
-       printf "Checking for directory /libexec ... "
-       if [ -d /libexec ]; then
-               echo "yes"
-               LIBEXECDIR=$PREFIX/libexec/resolvconf
-       else
-               echo "no"
-               LIBEXECDIR=$PREFIX/lib/resolvconf
-       fi
-fi
-if [ -z "$RUNDIR" ]; then
-       printf "Checking for directory /run ... "
-       if [ -d /run ]; then
-               echo "yes"
-               RUNDIR=/run
-       else
-               echo "no"
-               RUNDIR=/var/run
-       fi
-fi     
-
 : ${SED:=sed}
 
-: ${SYSCONFDIR:=$PREFIX/etc}
-: ${SBINDIR:=$PREFIX/sbin}
-: ${LIBEXECDIR:=$PREFIX/libexec/resolvconf}
-: ${STATEDIR:=/var}
-: ${RUNDIR:=$STATEDIR/run}
-: ${MANDIR:=${PREFIX:-/usr}/share/man}
-
-eval SYSCONFDIR="$SYSCONFDIR"
-eval SBINDIR="$SBINDIR"
-eval LIBEXECDIR="$LIBEXECDIR"
-eval VARDIR="$RUNDIR/resolvconf"
-eval MANDIR="$MANDIR"
-
 CONFIG_MK=config.mk
 
 if [ -z "$BUILD" ]; then
@@ -121,6 +87,10 @@ rm -rf $CONFIG_MK
 echo "# $OS" >$CONFIG_MK
 
 case "$OS" in
+dragonfly*)
+       # This means /usr HAS to be mounted not via dhcpcd
+       : ${LIBEXECDIR:=${PREFIX:-/usr}/libexec}
+       ;;
 freebsd*)
        # On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled
        # regardless of if it's not running.
@@ -136,6 +106,41 @@ linux*)
        ;;
 esac
 
+
+if [ -z "$LIBEXECDIR" ]; then
+       printf "Checking for directory /libexec ... "
+       if [ -d /libexec ]; then
+               echo "yes"
+               LIBEXECDIR=$PREFIX/libexec/resolvconf
+       else
+               echo "no"
+               LIBEXECDIR=$PREFIX/lib/resolvconf
+       fi
+fi
+if [ -z "$RUNDIR" ]; then
+       printf "Checking for directory /run ... "
+       if [ -d /run ]; then
+               echo "yes"
+               RUNDIR=/run
+       else
+               echo "no"
+               RUNDIR=/var/run
+       fi
+fi
+
+: ${SYSCONFDIR:=$PREFIX/etc}
+: ${SBINDIR:=$PREFIX/sbin}
+: ${LIBEXECDIR:=$PREFIX/libexec/resolvconf}
+: ${STATEDIR:=/var}
+: ${RUNDIR:=$STATEDIR/run}
+: ${MANDIR:=${PREFIX:-/usr}/share/man}
+
+eval SYSCONFDIR="$SYSCONFDIR"
+eval SBINDIR="$SBINDIR"
+eval LIBEXECDIR="$LIBEXECDIR"
+eval VARDIR="$RUNDIR/resolvconf"
+eval MANDIR="$MANDIR"
+
 for x in SYSCONFDIR SBINDIR LIBEXECDIR VARDIR MANDIR RESTARTCMD RCDIR STATUSARG
 do
        eval v=\$$x