Mercurial > hg > dhcpcd
changeset 5139:63e50443c7e3 draft
install: Dont move old files around to new locations
privsep user dir may not exist and this code wont work for
dhcpcd-9 anyway.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sun, 05 Apr 2020 16:50:59 +0100 |
| parents | 34391161e606 |
| children | ef39e8d21160 |
| files | README.md src/Makefile |
| diffstat | 2 files changed, 1 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/README.md Sun Apr 05 16:47:25 2020 +0100 +++ b/README.md Sun Apr 05 16:50:59 2020 +0100 @@ -90,9 +90,7 @@ `/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.
--- a/src/Makefile Sun Apr 05 16:47:25 2020 +0100 +++ b/src/Makefile Sun Apr 05 16:50:59 2020 +0100 @@ -97,32 +97,6 @@ # 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:
