From 470d822ff71ea531a1866184887f71ab3e690f18 Mon Sep 17 00:00:00 2001 From: roy Date: Sat, 1 Apr 2017 20:14:53 +0000 Subject: [PATCH] Move dhcpcd lease files to new location. --- usr.sbin/postinstall/postinstall | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usr.sbin/postinstall/postinstall b/usr.sbin/postinstall/postinstall index ad11f1102510..5e4e6d4a15bc 100755 --- a/usr.sbin/postinstall/postinstall +++ b/usr.sbin/postinstall/postinstall @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.212 2017/04/01 20:03:31 roy Exp $ +# $NetBSD: postinstall,v 1.213 2017/04/01 20:14:53 roy Exp $ # # Copyright (c) 2002-2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -909,6 +909,14 @@ do_dhcpcd() "${DEST_DIR}/var/db/dhcpcd/rdm_monotonic" failed=$(( ${failed} + $? )) + for lease in "${DEST_DIR}/var/db/dhcpcd-"*.lease*; do + [ -f "${lease}" ] || continue + new_lease=$(basename "${lease}" | ${SED} -e 's/dhcpcd-//') + new_lease="${DEST_DIR}/var/db/dhcpcd/${new_lease}" + move_file "${op}" "${lease}" "${new_lease}" + failed=$(( ${failed} + $? )) + done + return ${failed} }