dhcpcd: Remove chroot setup and restore things as they were before
authorRoy Marples <roy@marples.name>
Mon, 1 Jun 2020 10:12:39 +0000 (10:12 +0000)
committerRoy Marples <roy@marples.name>
Mon, 1 Jun 2020 10:12:39 +0000 (10:12 +0000)
Newer dhcpcd has an empty chroot.

etc/Makefile
etc/defaults/rc.conf
etc/mtree/BSD.var.dist
etc/rc.d/dhcpcd

index 1140b61..f92ad4a 100644 (file)
@@ -260,18 +260,6 @@ upgrade_base:      upgrade_check preupgrade remove-obsolete-files
                echo "  make install"; \
        fi
 
                echo "  make install"; \
        fi
 
-# Move the dhcpcd duid, secret and lease files to the chroot
-# to ensure users get the same address upon restarting.
-       DHCPCD_CHROOT=`pw -V ${DESTDIR}/etc usershow _dhcp | cut -d: -f9`; \
-       DHCPCD_CHROOT_DB="${DESTDIR}$$DHCPCD_CHROOT/var/db/dhcpcd"; \
-       if [ -f "${DESTDIR}/var/db/dhcpcd/duid" ] && \
-          [ ! -f "$$DHCPCD_CHROOT_DB/duid" ]; then \
-               mkdir -p "$$DHCPCD_CHROOT_DB" && \
-               mv "${DESTDIR}/var/db/dhcpcd/"* "$$DHCPCD_CHROOT_DB"; \
-               chown -R _dhcp:_dhcp "$$DHCPCD_CHROOT"; \
-               rmdir "${DESTDIR}/var/db/dhcpcd"; \
-       fi
-
 upgrade_etc:   upgrade_base remove-deprecated-files
        @echo "Upgrade was successful"
 
 upgrade_etc:   upgrade_base remove-deprecated-files
        @echo "Upgrade was successful"
 
index b745c40..8157762 100644 (file)
@@ -63,7 +63,6 @@ dhcp_client="dhclient"                # Name of the rc script that is called to start
 dhcpcd_enable="NO"             # Set to YES to run dhcpcd in master mode.
 dhcpcd_program="/sbin/dhcpcd"
 dhcpcd_flags="-b"
 dhcpcd_enable="NO"             # Set to YES to run dhcpcd in master mode.
 dhcpcd_program="/sbin/dhcpcd"
 dhcpcd_flags="-b"
-dhcpcd_chrootdir="/var/chroot/dhcp"
 dhclient_program="/sbin/dhclient"      # Path to dhcp client program.
 dhclient_flags="-w"            # Additional flags to pass to dhcp client.
 firewall_enable="NO"           # Set to YES to enable firewall functionality
 dhclient_program="/sbin/dhclient"      # Path to dhcp client program.
 dhclient_flags="-w"            # Additional flags to pass to dhcp client.
 firewall_enable="NO"           # Set to YES to enable firewall functionality
index 2c7431a..bd839ef 100644 (file)
         tabs            mode=0700
         ..
     ..
         tabs            mode=0700
         ..
     ..
-/set mode=0755
-    chroot
-        dhcp
-            var
-                run
-                ..
-            ..
-        ..
-    ..
 /set mode=0755
     db
         entropy         uname=operator gname=operator mode=0700
         ..
 /set mode=0755
     db
         entropy         uname=operator gname=operator mode=0700
         ..
+       dhcpcd
+       ..
     ..
     empty               mode=0555 flags=schg
     ..
     ..
     empty               mode=0555 flags=schg
     ..
index 9628e28..3a3e7cb 100644 (file)
@@ -3,7 +3,7 @@
 # PROVIDE: dhcpcd
 # REQUIRE: mountcritlocal cleanvar
 # BEFORE: mountcritremote
 # PROVIDE: dhcpcd
 # REQUIRE: mountcritlocal cleanvar
 # BEFORE: mountcritremote
-# KEYWORD: chrootdir nojail
+# KEYWORD: nojail
 
 . /etc/rc.subr
 . /etc/network.subr
 
 . /etc/rc.subr
 . /etc/network.subr