Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/postinstall Move dhcpcd lease files to new location.



details:   https://anonhg.NetBSD.org/src/rev/0221dacf299a
branches:  trunk
changeset: 352452:0221dacf299a
user:      roy <roy%NetBSD.org@localhost>
date:      Sat Apr 01 20:14:53 2017 +0000

description:
Move dhcpcd lease files to new location.

diffstat:

 usr.sbin/postinstall/postinstall |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r c8a673514214 -r 0221dacf299a usr.sbin/postinstall/postinstall
--- a/usr.sbin/postinstall/postinstall  Sat Apr 01 20:03:31 2017 +0000
+++ b/usr.sbin/postinstall/postinstall  Sat Apr 01 20:14:53 2017 +0000
@@ -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 @@
                "${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}
 }
 



Home | Main Index | Thread Index | Old Index