From: Roy Marples Date: Sun, 5 Apr 2020 15:50:59 +0000 (+0100) Subject: install: Dont move old files around to new locations X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da3c5c400a677a45b8a8af9d28d2c5af7c46063f;p=thirdparty%2Fdhcpcd.git install: Dont move old files around to new locations privsep user dir may not exist and this code wont work for dhcpcd-9 anyway. --- diff --git a/README.md b/README.md index 182aa46b..cf1c0727 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,7 @@ dhcpcd-7 defaults the database directory to `/var/db/dhcpcd` instead of `/var/db` and now stores dhcpcd.duid and dhcpcd.secret in there instead of in /etc. dhcpcd-9 requires this directory and contents to be writeable by the -unprivileged user (default _dhcpcd). -The Makefile `_confinstall` target will attempt to move the files correctly from -the old locations to the new locations. +unprivileged user (default _dhcpcd, _dhcp or dhcpcd). Of course this won't work if dhcpcd is packaged up, so packagers will need to install similar logic into their dhcpcd package. diff --git a/src/Makefile b/src/Makefile index 4853fd81..28fb6e35 100644 --- a/src/Makefile +++ b/src/Makefile @@ -97,32 +97,6 @@ _confinstall: # Install a new default config if not present test -e ${DESTDIR}${SYSCONFDIR}/dhcpcd.conf || \ ${INSTALL} -m ${CONFMODE} dhcpcd.conf ${DESTDIR}${SYSCONFDIR} - # Attempt to move files from sysconfig to dbdir - if [ ! -e ${DESTDIR}${DBDIR}/duid -a \ - -e ${DESTDIR}${SYSCONFDIR}/dhcpcd.duid ]; \ - then \ - mv ${DESTDIR}${SYSCONFDIR}/dhcpcd.duid \ - ${DESTDIR}${DBDIR}/duid; \ - fi - if [ ! -e ${DESTDIR}${DBDIR}/secret -a \ - -e ${DESTDIR}${SYSCONFDIR}/dhcpcd.secret ]; \ - then \ - mv ${DESTDIR}${SYSCONFDIR}/dhcpcd.secret \ - ${DESTDIR}${DBDIR}/secret; \ - fi - # Move leases to new location - for lease in ${DESTDIR}${DBDIR}/../dhcpcd-*.lease*; do \ - [ -f "$$lease" ] || continue; \ - newlease=$$(basename "$$lease" | ${SED} -e "s/dhcpcd-//"); \ - mv "$$lease" ${DESTDIR}${DBDIR}/"$$newlease"; \ - done - # Move RDM monotonic to new location - if [ ! -e ${DESTDIR}${DBDIR}/rdm_monotonic -a \ - -e ${DESTDIR}${DBDIR}/../dhcpcd-rdm.monotonic ]; \ - then \ - mv ${DESTDIR}${DBDIR}/../dhcpcd-rdm.monotonic \ - ${DESTDIR}${DBDIR}/rdm_monotonic; \ - fi eginstall: